Skip to content

Commit fe9251e

Browse files
committed
Change serialization version of doc-value fields.
Relates #29639
1 parent ec1c8c4 commit fe9251e

File tree

7 files changed

+14
-17
lines changed

7 files changed

+14
-17
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/search.inner_hits/10_basic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ setup:
4545
"Nested doc version and seqIDs":
4646

4747
- skip:
48-
version: " - 6.99.99" # TODO change to 6.3.99 on backport
48+
version: " - 6.3.99"
4949
reason: "object notation for docvalue_fields was introduced in 6.4"
5050

5151
- do:

rest-api-spec/src/main/resources/rest-api-spec/test/search/10_source_filtering.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ setup:
134134
---
135135
"docvalue_fields":
136136
- skip:
137-
version: " - 6.99.99" # TODO: change version on backport
137+
version: " - 6.3.99"
138138
reason: format option was added in 6.4
139139
features: warnings
140140
- do:
@@ -148,7 +148,7 @@ setup:
148148
---
149149
"docvalue_fields as url param":
150150
- skip:
151-
version: " - 6.99.99" # TODO: change version on backport
151+
version: " - 6.3.99"
152152
reason: format option was added in 6.4
153153
features: warnings
154154
- do:
@@ -161,7 +161,7 @@ setup:
161161
---
162162
"docvalue_fields with default format":
163163
- skip:
164-
version: " - 6.99.99" # TODO: change version on backport
164+
version: " - 6.3.99"
165165
reason: format option was added in 6.4
166166
- do:
167167
search:
@@ -174,7 +174,7 @@ setup:
174174
---
175175
"docvalue_fields with explicit format":
176176
- skip:
177-
version: " - 6.99.99" # TODO: change version on backport
177+
version: " - 6.3.99"
178178
reason: format option was added in 6.4
179179
- do:
180180
search:

rest-api-spec/src/main/resources/rest-api-spec/test/search/30_limits.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ setup:
5454
---
5555
"Docvalues_fields size limit":
5656
- skip:
57-
version: " - 5.99.99"
58-
reason: soft limit for docvalue_fields only available as of 6.0.0
57+
version: " - 6.3.99"
58+
reason: "The object notation for docvalue_fields is only supported on 6.4+"
5959

6060
- do:
6161
indices.create:
@@ -64,9 +64,6 @@ setup:
6464
settings:
6565
index.max_docvalue_fields_search: 2
6666

67-
- skip:
68-
version: " - 6.99.99" # TODO: change to 6.3.99 on backport
69-
reason: "The object notation for docvalue_fields is only supported on 6.4+"
7067
- do:
7168
catch: /Trying to retrieve too many docvalue_fields\. Must be less than or equal to[:] \[2\] but was \[3\]\. This limit can be set by changing the \[index.max_docvalue_fields_search\] index level setting\./
7269
search:

server/src/main/java/org/elasticsearch/index/query/InnerHitBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public InnerHitBuilder(StreamInput in) throws IOException {
137137
version = in.readBoolean();
138138
trackScores = in.readBoolean();
139139
storedFieldsContext = in.readOptionalWriteable(StoredFieldsContext::new);
140-
if (in.getVersion().before(Version.V_7_0_0_alpha1)) { // TODO: change to 6.4.0 after backport
140+
if (in.getVersion().before(Version.V_6_4_0)) {
141141
List<String> fieldList = (List<String>) in.readGenericValue();
142142
if (fieldList == null) {
143143
docValueFields = null;
@@ -188,7 +188,7 @@ public void writeTo(StreamOutput out) throws IOException {
188188
out.writeBoolean(version);
189189
out.writeBoolean(trackScores);
190190
out.writeOptionalWriteable(storedFieldsContext);
191-
if (out.getVersion().before(Version.V_7_0_0_alpha1)) { // TODO: change to 6.4.0 after backport
191+
if (out.getVersion().before(Version.V_6_4_0)) {
192192
out.writeGenericValue(docValueFields == null
193193
? null
194194
: docValueFields.stream().map(ff -> ff.field).collect(Collectors.toList()));

server/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public SearchSourceBuilder(StreamInput in) throws IOException {
201201
aggregations = in.readOptionalWriteable(AggregatorFactories.Builder::new);
202202
explain = in.readOptionalBoolean();
203203
fetchSourceContext = in.readOptionalWriteable(FetchSourceContext::new);
204-
if (in.getVersion().before(Version.V_7_0_0_alpha1)) { // TODO: change to 6.4.0 after backport
204+
if (in.getVersion().before(Version.V_6_4_0)) {
205205
List<String> dvFields = (List<String>) in.readGenericValue();
206206
if (dvFields == null) {
207207
docValueFields = null;
@@ -265,7 +265,7 @@ public void writeTo(StreamOutput out) throws IOException {
265265
out.writeOptionalWriteable(aggregations);
266266
out.writeOptionalBoolean(explain);
267267
out.writeOptionalWriteable(fetchSourceContext);
268-
if (out.getVersion().before(Version.V_7_0_0_alpha1)) { // TODO: change to 6.4.0 after backport
268+
if (out.getVersion().before(Version.V_6_4_0)) {
269269
out.writeGenericValue(docValueFields == null
270270
? null
271271
: docValueFields.stream().map(ff -> ff.field).collect(Collectors.toList()));

server/src/main/java/org/elasticsearch/search/fetch/subphase/DocValueFieldsContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public FieldAndFormat(String field, @Nullable String format) {
8080
/** Serialization constructor. */
8181
public FieldAndFormat(StreamInput in) throws IOException {
8282
this.field = in.readString();
83-
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { // TODO: change to 6.4.0 after backport
83+
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
8484
format = in.readOptionalString();
8585
} else {
8686
format = null;
@@ -90,7 +90,7 @@ public FieldAndFormat(StreamInput in) throws IOException {
9090
@Override
9191
public void writeTo(StreamOutput out) throws IOException {
9292
out.writeString(field);
93-
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { // TODO: change to 6.4.0 after backport
93+
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
9494
out.writeOptionalString(format);
9595
}
9696
}

x-pack/plugin/src/test/resources/rest-api-spec/test/sql/translate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
"Translate SQL":
33
- skip:
4-
version: " - 6.99.99" # TODO: change version on backport
4+
version: " - 6.3.99"
55
reason: format option was added in 6.4
66
features: warnings
77

0 commit comments

Comments
 (0)