Hello community ! I'm seeking assistance on implementing highlighting within suggestion results in Elasticsearch. Currently, I'm utilizing the completion suggester field to generate suggestions.
Context:
When utilizing the completion suggester in Elasticsearch, it doesn't directly support highlighting similar to regular search queries.
To implement highlighting in suggestion results from the Elasticsearch completion suggester, you need a workaround because the suggester itself doesn't support highlighting. First, query the suggester to get suggestions, then use those suggestions to perform a regular search query with highlighting enabled on a text field containing the same data. Finally, combine the suggestion and highlighting results for the final output.
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.