From 08eda438996ea7a97d5e88a4c32d513ce710b5d0 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Mon, 22 May 2017 12:20:26 +0200 Subject: [PATCH] percolator: Use QueryBuilder.rewriteQuery(...) to rewrite query builder instead of QueryBuilder.rewrite(...) Relates to #24617 --- .../org/elasticsearch/percolator/PercolatorFieldMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/percolator/src/main/java/org/elasticsearch/percolator/PercolatorFieldMapper.java b/modules/percolator/src/main/java/org/elasticsearch/percolator/PercolatorFieldMapper.java index 1865f68158e..186e53591ae 100644 --- a/modules/percolator/src/main/java/org/elasticsearch/percolator/PercolatorFieldMapper.java +++ b/modules/percolator/src/main/java/org/elasticsearch/percolator/PercolatorFieldMapper.java @@ -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()));