From 0f9848e2435df1c7c48d28113d260f6cca0d9983 Mon Sep 17 00:00:00 2001 From: markharwood Date: Wed, 13 Oct 2021 15:18:25 +0100 Subject: [PATCH] BWC change following backport of PR 78697 to 7.x (#79067) BWC change following backport of PR 78697 to 7.x Closes #74121 --- .../search/search-your-data/retrieve-selected-fields.asciidoc | 2 +- .../java/org/elasticsearch/common/document/DocumentField.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/search/search-your-data/retrieve-selected-fields.asciidoc b/docs/reference/search/search-your-data/retrieve-selected-fields.asciidoc index 73a56a769fc98..1cf05d264030d 100644 --- a/docs/reference/search/search-your-data/retrieve-selected-fields.asciidoc +++ b/docs/reference/search/search-your-data/retrieve-selected-fields.asciidoc @@ -379,7 +379,7 @@ won't be included in the response because `include_unmapped` isn't set to [discrete] [[Ignored-field values]] ==== Ignored field values -The `fields` option only returns values that were valid when indexed. +The `fields` section of the response only returns values that were valid when indexed. If your search request asks for values from a field that ignored certain because they were malformed or too large these values are returned separately in an `ignored_field_values` section. diff --git a/server/src/main/java/org/elasticsearch/common/document/DocumentField.java b/server/src/main/java/org/elasticsearch/common/document/DocumentField.java index 1ddd0879e0fbf..8c50f28d78572 100644 --- a/server/src/main/java/org/elasticsearch/common/document/DocumentField.java +++ b/server/src/main/java/org/elasticsearch/common/document/DocumentField.java @@ -43,7 +43,7 @@ public class DocumentField implements Writeable, Iterable { public DocumentField(StreamInput in) throws IOException { name = in.readString(); values = in.readList(StreamInput::readGenericValue); - if (in.getVersion().onOrAfter(Version.V_8_0_0)) { + if (in.getVersion().onOrAfter(Version.V_7_16_0)) { ignoredValues = in.readList(StreamInput::readGenericValue); } else { ignoredValues = Collections.emptyList(); @@ -102,7 +102,7 @@ public List getIgnoredValues() { public void writeTo(StreamOutput out) throws IOException { out.writeString(name); out.writeCollection(values, StreamOutput::writeGenericValue); - if (out.getVersion().onOrAfter(Version.V_8_0_0)) { + if (out.getVersion().onOrAfter(Version.V_7_16_0)) { out.writeCollection(ignoredValues, StreamOutput::writeGenericValue); }