Apply different tags for different terms in highlight API

We have a requirement to highlight different terms with the different color.
To achieve the same could you please let us know if Elastic search Highlight API can provide multiple tags for different terms. For example, we have below query string

"query": {
"query_string" : {
"default_field" : "content",
"query" : "(new york city) OR (big apple)"
}
}

For the above query, Highlight API should provide different tags for "new york city" and "big apple" so that we can define the css class for different tags respectively and will apply the color required.

2 Likes

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