#26720: Set the correct bwc version after backport to 6.0

This commit is contained in:
Christoph Büscher 2017-09-20 16:14:11 +02:00
parent 22e200e79a
commit 3d67915ed5
1 changed files with 4 additions and 8 deletions

View File

@ -110,13 +110,11 @@ public class MatchQueryBuilder extends AbstractQueryBuilder<MatchQueryBuilder> {
super(in);
fieldName = in.readString();
value = in.readGenericValue();
// TODO lower this version once this has been backported to 6.0.0
if (in.getVersion().before(Version.V_7_0_0_alpha1)) {
if (in.getVersion().before(Version.V_6_0_0_rc1)) {
MatchQuery.Type.readFromStream(in); // deprecated type
}
operator = Operator.readFromStream(in);
// TODO lower this version once this has been backported to 6.0.0
if (in.getVersion().before(Version.V_7_0_0_alpha1)) {
if (in.getVersion().before(Version.V_6_0_0_rc1)) {
in.readVInt(); // deprecated slop
}
prefixLength = in.readVInt();
@ -139,13 +137,11 @@ public class MatchQueryBuilder extends AbstractQueryBuilder<MatchQueryBuilder> {
protected void doWriteTo(StreamOutput out) throws IOException {
out.writeString(fieldName);
out.writeGenericValue(value);
// TODO lower this version once this has been backported to 6.0.0
if (out.getVersion().before(Version.V_7_0_0_alpha1)) {
if (out.getVersion().before(Version.V_6_0_0_rc1)) {
MatchQuery.Type.BOOLEAN.writeTo(out); // deprecated type
}
operator.writeTo(out);
// TODO lower this version once this has been backported to 6.0.0
if (out.getVersion().before(Version.V_7_0_0_alpha1)) {
if (out.getVersion().before(Version.V_6_0_0_rc1)) {
out.writeVInt(MatchQuery.DEFAULT_PHRASE_SLOP); // deprecated slop
}
out.writeVInt(prefixLength);