From 059ef5c749d2d2efcf50332c69327b5754e1600e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Mon, 24 Aug 2015 12:42:23 +0200 Subject: [PATCH] Query DSL: Remove unsupported `rewrite` option from match query builder The `rewrite` option has been removed from the parser with commit da5fa6c4 and won't parse anymore, however we still have a setter for it in the builder that gets rendered out when used and potentially leads to parsing errors. This PR removes the setter for the unsupported `rewrite` option. --- .../elasticsearch/index/query/MatchQueryBuilder.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java b/core/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java index e4a643f1350..6f73f08dc02 100644 --- a/core/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java +++ b/core/src/main/java/org/elasticsearch/index/query/MatchQueryBuilder.java @@ -78,8 +78,6 @@ public class MatchQueryBuilder extends QueryBuilder implements BoostableQueryBui private String minimumShouldMatch; - private String rewrite = null; - private String fuzzyRewrite = null; private Boolean lenient; @@ -179,11 +177,6 @@ public class MatchQueryBuilder extends QueryBuilder implements BoostableQueryBui return this; } - public MatchQueryBuilder rewrite(String rewrite) { - this.rewrite = rewrite; - return this; - } - public MatchQueryBuilder fuzzyRewrite(String fuzzyRewrite) { this.fuzzyRewrite = fuzzyRewrite; return this; @@ -249,9 +242,6 @@ public class MatchQueryBuilder extends QueryBuilder implements BoostableQueryBui if (minimumShouldMatch != null) { builder.field("minimum_should_match", minimumShouldMatch); } - if (rewrite != null) { - builder.field("rewrite", rewrite); - } if (fuzzyRewrite != null) { builder.field("fuzzy_rewrite", fuzzyRewrite); }