How do you build query suggester like Google/Amazon? Suggest by token instead of suggesting a result

This feature is available on Elastic App Search, but I want to implement this kind of suggestion using Elasticsearch.

I've been messing around this for 3 days straight with no luck. My closest approach to this is to use the completion suggester, by splitting the words in a sentence to form a shingle (manually with nodeJS and some regex & for loops), and then using those shingles as an input in the completion suggester. I am sure there is a better way.

Any idea on how to this better? I'd very much appreciate any pointers you can give :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.