Search as you type

Elasticsearch has Search-as-you-type datatype is it possible to achieve similar wit Redisearch?

1 Like

Hello,

In RediSearch you can achieve that with a Suggestion field or simply with a default Search index and send proper query from your client application.

I have implemented for example an autocomplete feature using this in this application:

As mentioned above you can do the same with an index and query the index when user is typing.

Note: I am not familiar with the search-as-you-type feature from Elastic and all the added value so maybe you can tell here which “feature” your application needs and I can provide some ideas about the implementation.

Regards
Tug
@tgrall

@tgrall, Thanks I think I can not use Suggestion field as the content of my field has always multiple tokens eg: “star wars 2”, “star trek continue”, etc… and would like to do suggestion based on any string user types eg: “continue”. So I need to look at querying the index instead and use prefix query?

However with querying index I am not sure how to construct a query to make sure we take care for all the typos that user can send? For example when user types “stax” by mistake I would like to have both returned: “star wars 2” and “star trek continue”.
Do I send something like: FT.search test "(stax* | stax | %%stax%%)=>{$phonetic:true}", so it is one query?

Thanks

@bogumil

regarding your spellcheck , try using RediSearch Spell Check & Custom Dictionaries features.

@kyle has very detailed blog about this: https://redislabs.com/blog/redisearch-1-4-phonetics-spell-check/

Hope this helps.

1 Like

Thanks for the link to the blog post. The discussion are the use of custom dictionaries and how they can be used for domain-specific terms is interesting and useful.

1 Like