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.
This commit is contained in:
parent
cb68a2196d
commit
059ef5c749
|
@ -78,8 +78,6 @@ public class MatchQueryBuilder extends QueryBuilder implements BoostableQueryBui
|
||||||
|
|
||||||
private String minimumShouldMatch;
|
private String minimumShouldMatch;
|
||||||
|
|
||||||
private String rewrite = null;
|
|
||||||
|
|
||||||
private String fuzzyRewrite = null;
|
private String fuzzyRewrite = null;
|
||||||
|
|
||||||
private Boolean lenient;
|
private Boolean lenient;
|
||||||
|
@ -179,11 +177,6 @@ public class MatchQueryBuilder extends QueryBuilder implements BoostableQueryBui
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MatchQueryBuilder rewrite(String rewrite) {
|
|
||||||
this.rewrite = rewrite;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public MatchQueryBuilder fuzzyRewrite(String fuzzyRewrite) {
|
public MatchQueryBuilder fuzzyRewrite(String fuzzyRewrite) {
|
||||||
this.fuzzyRewrite = fuzzyRewrite;
|
this.fuzzyRewrite = fuzzyRewrite;
|
||||||
return this;
|
return this;
|
||||||
|
@ -249,9 +242,6 @@ public class MatchQueryBuilder extends QueryBuilder implements BoostableQueryBui
|
||||||
if (minimumShouldMatch != null) {
|
if (minimumShouldMatch != null) {
|
||||||
builder.field("minimum_should_match", minimumShouldMatch);
|
builder.field("minimum_should_match", minimumShouldMatch);
|
||||||
}
|
}
|
||||||
if (rewrite != null) {
|
|
||||||
builder.field("rewrite", rewrite);
|
|
||||||
}
|
|
||||||
if (fuzzyRewrite != null) {
|
if (fuzzyRewrite != null) {
|
||||||
builder.field("fuzzy_rewrite", fuzzyRewrite);
|
builder.field("fuzzy_rewrite", fuzzyRewrite);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue