Highlighting hits based on proximity of multiple phrases


(reza sadoddin) #1

Hello all,
I have bool query with matches on several phrases (`must' condition over several match_phrase queries), and I also use highlighting feature of Elasticsearch to return snippets.
I want to get the snippets in which phrases appear closest to each other, but Elasticsearch doesn't return the most relevant snippets through highlighting feature.

Any suggestion to address this request?
Thank you,


(system) #2