Skip to content

Commit f55b09b

Browse files
committed
Update the version checks around ip_range bucket keys, now that the change was backported.
1 parent 3622486 commit f55b09b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/40_range.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ setup:
213213
---
214214
"IP Range Key Generation":
215215
- skip:
216-
version: " - 6.99.99"
217-
reason: "Before 7.0.0, ip_range did not always generate bucket keys (see #21045)."
216+
version: " - 6.3.99"
217+
reason: "Before 6.4.0, ip_range did not always generate bucket keys (see #21045)."
218218

219219
- do:
220220
search:

server/src/main/java/org/elasticsearch/search/aggregations/bucket/range/InternalBinaryRange.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private static String generateKey(BytesRef from, BytesRef to, DocValueFormat for
7474
}
7575

7676
private static Bucket createFromStream(StreamInput in, DocValueFormat format, boolean keyed) throws IOException {
77-
String key = in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)
77+
String key = in.getVersion().onOrAfter(Version.V_6_4_0)
7878
? in.readString()
7979
: in.readOptionalString();
8080

@@ -88,7 +88,7 @@ private static Bucket createFromStream(StreamInput in, DocValueFormat format, bo
8888

8989
@Override
9090
public void writeTo(StreamOutput out) throws IOException {
91-
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
91+
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
9292
out.writeString(key);
9393
} else {
9494
out.writeOptionalString(key);

0 commit comments

Comments
 (0)