elasticsearch/elasticsearch — pull request #5143 by javanna (2014-02-17 13:02:59+00:00)
Title: Fixed multi term queries support in postings highlighter for non top-level queries

In #4052 we added support for highlighting multi term queries using the postings highlighter. That worked only for top-level queries though, and not for multi term queries that are nested for instance within a bool query, or filtered query, or a constant score query.

The way we can make this work is by walking the query structure and temporarily overriding the query rewrite method with a method that allows for multi terms extraction.

Closes #5102