percolator: Use QueryBuilder.rewriteQuery(...) to rewrite query builder instead of QueryBuilder.rewrite(...)

Relates to #24617
This commit is contained in:
Martijn van Groningen 2017-05-22 12:20:26 +02:00
parent 086abe6216
commit 08eda43899
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
1 changed files with 1 additions and 1 deletions

View File

@ -282,7 +282,7 @@ public class PercolatorFieldMapper extends FieldMapper {
);
verifyQuery(queryBuilder);
// Fetching of terms, shapes and indexed scripts happen during this rewrite:
queryBuilder = queryBuilder.rewrite(queryShardContext);
queryBuilder = QueryBuilder.rewriteQuery(queryBuilder, queryShardContext);
try (XContentBuilder builder = XContentFactory.contentBuilder(QUERY_BUILDER_CONTENT_TYPE)) {
queryBuilder.toXContent(builder, new MapParams(Collections.emptyMap()));