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

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>

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