Highlighting with single set of pre and post tags for multi-word phrase search


(Swapnil Nawale) #1

I am trying to run an elasticsearch match_phrase query along with the plain highlighter. I need to search for the multi-word phrases. The issue is that the pre and post tags get appended for each word in the multi-word phrase. Is there a way to output only one set of pre and post tags around the complete phrase?

e.g. Searching for "lorem ipsum", currently gives me:

<em>lorem</em> <em>ipsum</em>

And I want to get following highlighting:

<em>lorem ipsum</em>

(system) #2

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