Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

autosuggestion #1

Open
b3z opened this issue Dec 15, 2020 · 1 comment
Open

autosuggestion #1

b3z opened this issue Dec 15, 2020 · 1 comment
Labels
feature Planned feature
Projects
Milestone

Comments

@b3z
Copy link
Owner

b3z commented Dec 15, 2020

add autosuggestion on typing. Redisearch should support that.

@b3z b3z added the feature Planned feature label Dec 15, 2020
@b3z
Copy link
Owner Author

b3z commented Dec 18, 2020

https://oss.redislabs.com/redisearch/Commands/#suggestions

need to make a suggestion dict

Another important feature for RediSearch is its auto-complete engine. This allows users to create dictionaries of weighted terms, and then query them for completion suggestions to a given user prefix. Completions can have "payloads" - a user-provided piece of data that can be used for display. For example, completing the names of users, it is possible to add extra metadata about users to be displayed al

For example, if a user starts to put the term “lcd tv” into a dictionary, sending the prefix “lc” will return the full term as a result. The dictionary is modeled as a compact trie (prefix tree) with weights, which is traversed to find the top suffixes of a prefix.

RediSearch also allows for Fuzzy Suggestions, meaning you can get suggestions to prefixes even if the user makes a typo in their prefix. This is enabled using a Levenshtein Automaton, allowing efficient searching of the dictionary for all terms within a maximal Levenshtein Distance of a term or prefix. Then suggestions are weighted based on both their original score and their distance from the prefix typed by the user.

However, searching for fuzzy prefixes (especially very short ones) will traverse an enormous number of suggestions. In fact, fuzzy suggestions for any single letter will traverse the entire dictionary, so we recommend using this feature carefully, in consideration of the performance penalty it incurs.

RediSearch's auto-completer supports Unicode, allowing for fuzzy matches in non-latin languages as well.

@b3z b3z added this to To do in reventlou via automation Jan 9, 2021
@b3z b3z added this to the 1.2.0 milestone Jan 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Planned feature
Projects
reventlou
  
To do
Development

No branches or pull requests

1 participant