Update the version compatibility for zero_terms_query in match_phrase.
The change was just backported to 6.x.
This commit is contained in:
parent
955709b3f3
commit
48461ac143
|
@ -72,7 +72,7 @@ public class MatchPhraseQueryBuilder extends AbstractQueryBuilder<MatchPhraseQue
|
||||||
fieldName = in.readString();
|
fieldName = in.readString();
|
||||||
value = in.readGenericValue();
|
value = in.readGenericValue();
|
||||||
slop = in.readVInt();
|
slop = in.readVInt();
|
||||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
|
||||||
zeroTermsQuery = ZeroTermsQuery.readFromStream(in);
|
zeroTermsQuery = ZeroTermsQuery.readFromStream(in);
|
||||||
}
|
}
|
||||||
analyzer = in.readOptionalString();
|
analyzer = in.readOptionalString();
|
||||||
|
@ -83,7 +83,7 @@ public class MatchPhraseQueryBuilder extends AbstractQueryBuilder<MatchPhraseQue
|
||||||
out.writeString(fieldName);
|
out.writeString(fieldName);
|
||||||
out.writeGenericValue(value);
|
out.writeGenericValue(value);
|
||||||
out.writeVInt(slop);
|
out.writeVInt(slop);
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
|
||||||
zeroTermsQuery.writeTo(out);
|
zeroTermsQuery.writeTo(out);
|
||||||
}
|
}
|
||||||
out.writeOptionalString(analyzer);
|
out.writeOptionalString(analyzer);
|
||||||
|
|
Loading…
Reference in New Issue