Skip to content

Commit

Permalink
Fix the version tests (#4035)
Browse files Browse the repository at this point in the history
Signed-off-by: Hauck <[email protected]>
  • Loading branch information
hauck-jvsh authored Jul 28, 2022
1 parent 00db112 commit 85bfde1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ setup:
---
"Unified highlighter on a field WITHOUT OFFSETS using max_analyzer_offset should SUCCEED":
- skip:
version: " - 2.99.99"
reason: only starting supporting the parameter max_analyzer_offset on version 3.0
version: " - 2.1.99"
reason: only starting supporting the parameter max_analyzer_offset on version 2.2
- do:
search:
rest_total_hits_as_int: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ protected AbstractHighlighterBuilder(StreamInput in) throws IOException {

requireFieldMatch(in.readOptionalBoolean());

if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_2_0)) {
maxAnalyzerOffset(in.readOptionalVInt());
}

Expand Down Expand Up @@ -234,7 +234,7 @@ public final void writeTo(StreamOutput out) throws IOException {
out.writeMap(options);
}
out.writeOptionalBoolean(requireFieldMatch);
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_2_0)) {
out.writeOptionalVInt(maxAnalyzerOffset);
}
doWriteTo(out);
Expand Down

0 comments on commit 85bfde1

Please sign in to comment.