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>