elasticsearch/elasticsearch — pull request #2333 by s1monw (2012-10-17 08:25:30+00:00)
Title: #2332 support CustomScoreQuery highlighting and expose QueryBuilder on CustomScoreQuery via Java API

This PR moves some of the "hacked" query extraction into a custom SpanTermExtractor that can extract those queries even if they are nested in a BQ or similar composite queries. This also exposes queryBuilder support on CustomScoreQueryBuilder via the Java API - this fixes #2332