Hello, I am running an suggestions query using Elasticsearch v5.5. When looking for a whole word in the document (e.g. 'kneecap'), suggestions are not returned when the whole word is typed, but it does appear when typing part of the word (e.g. 'kneec'). I tried adding 'suggest_mode' => 'always into the params, but it still does not return the desired word.
Maybe you have a self-made example of how you are indexing the document. It doesn't have to be all mapping but just the field that you apply the type suggest.
I recently implemented the completion suggester and had no problems.
I what to know that specific term was or wasn't present in my index during suggestion, e.g. understand when it is a full match or there is no matches at all. How can I achieve it?
There is a difference in the two cases.
In yours you make use of the Term suggester.
The term suggester suggests terms based on edit distance. The provided suggest text is analyzed before terms are suggested. The suggested terms are provided per analyzed suggest text token. The term suggester doesn’t take the query into account that is part of request.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.