Skip to content

Commit

Permalink
Update version to 3.0
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Aug 21, 2024
1 parent 89ff5c8 commit ce3eb14
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public FuzzyQueryBuilder(StreamInput in) throws IOException {
maxExpansions = in.readVInt();
transpositions = in.readBoolean();
rewrite = in.readOptionalString();
if (in.getVersion().onOrAfter(Version.V_2_17_0)) {
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
rewriteOverride = in.readOptionalString();
}
}
Expand All @@ -200,7 +200,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeVInt(this.maxExpansions);
out.writeBoolean(this.transpositions);
out.writeOptionalString(this.rewrite);
if (out.getVersion().onOrAfter(Version.V_2_17_0)) {
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
out.writeOptionalString(rewriteOverride);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public PrefixQueryBuilder(StreamInput in) throws IOException {
value = in.readString();
rewrite = in.readOptionalString();
caseInsensitive = in.readBoolean();
if (in.getVersion().onOrAfter(Version.V_2_17_0)) {
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
rewriteOverride = in.readOptionalString();
}
}
Expand All @@ -114,7 +114,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeString(value);
out.writeOptionalString(rewrite);
out.writeBoolean(caseInsensitive);
if (out.getVersion().onOrAfter(Version.V_2_17_0)) {
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
out.writeOptionalString(rewriteOverride);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public RangeQueryBuilder(StreamInput in) throws IOException {
throw new IllegalArgumentException("[range] query does not support relation [" + relationString + "]");
}
}
if (in.getVersion().after(Version.V_2_17_0)) {
if (in.getVersion().after(Version.V_3_0_0)) {
rewriteOverride = in.readOptionalString();
}
}
Expand All @@ -145,7 +145,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
relationString = this.relation.getRelationName();
}
out.writeOptionalString(relationString);
if (out.getVersion().after(Version.V_2_17_0)) {
if (out.getVersion().after(Version.V_3_0_0)) {
out.writeOptionalString(rewriteOverride);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public RegexpQueryBuilder(StreamInput in) throws IOException {
maxDeterminizedStates = in.readVInt();
rewrite = in.readOptionalString();
caseInsensitive = in.readBoolean();
if (in.getVersion().after(Version.V_2_17_0)) {
if (in.getVersion().after(Version.V_3_0_0)) {
rewriteOverride = in.readOptionalString();
}
}
Expand All @@ -130,7 +130,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeVInt(maxDeterminizedStates);
out.writeOptionalString(rewrite);
out.writeBoolean(caseInsensitive);
if (out.getVersion().after(Version.V_2_17_0)) {
if (out.getVersion().after(Version.V_3_0_0)) {
out.writeOptionalString(rewriteOverride);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public TermsQueryBuilder(StreamInput in) throws IOException {
termsLookup = in.readOptionalWriteable(TermsLookup::new);
values = (List<?>) in.readGenericValue();
this.supplier = null;
if (in.getVersion().after(Version.V_2_17_0)) {
if (in.getVersion().after(Version.V_3_0_0)) {
rewriteOverride = in.readOptionalString();
}
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
Expand All @@ -274,7 +274,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeString(fieldName);
out.writeOptionalWriteable(termsLookup);
out.writeGenericValue(values);
if (out.getVersion().after(Version.V_2_17_0)) {
if (out.getVersion().after(Version.V_3_0_0)) {
out.writeOptionalString(rewriteOverride);
}
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public WildcardQueryBuilder(StreamInput in) throws IOException {
value = in.readString();
rewrite = in.readOptionalString();
caseInsensitive = in.readBoolean();
if (in.getVersion().after(Version.V_2_17_0)) {
if (in.getVersion().after(Version.V_3_0_0)) {
rewriteOverride = in.readOptionalString();
}
}
Expand All @@ -124,7 +124,7 @@ protected void doWriteTo(StreamOutput out) throws IOException {
out.writeString(value);
out.writeOptionalString(rewrite);
out.writeBoolean(caseInsensitive);
if (out.getVersion().after(Version.V_2_17_0)) {
if (out.getVersion().after(Version.V_3_0_0)) {
out.writeOptionalString(rewriteOverride);
}
}
Expand Down

0 comments on commit ce3eb14

Please sign in to comment.