Highlight behaviour

Referring to https://www.elastic.co/guide/en/elasticsearch//reference/current/search-request-body.html#request-body-search-highlighting

The note says,

Highlighters don’t reflect the boolean logic of a query when extracting terms to highlight. Thus, for some complex boolean queries (e.g nested boolean queries, queries using minimum_should_match etc.), parts of documents may be highlighted that don’t correspond to query matches.

Is there a work around to achieve this? I am relying on highlights to figure out which query completely matched in boolean logic. But it is not the right way to use it as I see.

1 Like

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