How does completion suggester work?


(Yu Watanabe) #1

Hello.

I am in a situation where I will need to implement autocomplete function . I'm thinking of using the completion suggester .

I have read below two related sources and would like to ask for help .

Completion Suggester
https://www.elastic.co/guide/en/elasticsearch/reference/6.2/search-suggesters-completion.html#search-suggesters-completion

You complete me

Q1. In the blog , it says that suggester is not the same as regular full text query.

Why has it returned just Mercure Hotel Munich? Why doesn't it include Hotel Monaco or Marriot? The reason is that an FST query is not the same as a full text query. We can't find words anywhere within a phrase. Instead, we have to start at the left of the graph and move towards the right. The only suggestion that starts with an m is the Mercure Hotel Munich.

However, in the latest document, you can specify analyzer and search_analyzer for suggester field. How does the suggester search actually work if you specify analyzer where the search is not full text query ?

Q2. At best , I am expecting to maintain input in suggestion fied in near realtime. Generally, do you maintain the input periodically (e.g every 5 min ) for auto completion or could it possibly be maintained near real time ?

I appreciate if someone can give me advice me about my questions.

Best Regards,
Yu Watanabe


(system) #2

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