Multi match field highlight if all words match


i am having some issue with multi_match field highlight, here my scenorio


"multi_match": {
"query": "quick brown fox",
"fields": [ "title", "body" ],
"type": "best_fields" # default

Hightlight type : Plain


title : quick brown
body : quick brown fox


It needs to highlight only "body" which has all words but its highlighting "quick brown" words also in title also.

Try to set the "type" of your "multi_match" to "phrase".

Thanks for the replay, I have used matched queries for identifying the matched fields.

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