diff --git a/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java b/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java index a0121947eb1..4cfd5be2afe 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java @@ -458,9 +458,9 @@ public abstract class ParseContext implements Iterable{ void postParse() { if (documents.size() > 1) { docsReversed = true; - if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_7_0_0_alpha1)) { + if (indexSettings.getIndexVersionCreated().onOrAfter(Version.V_6_5_0)) { /** - * For indices created on or after {@link Version#V_7_0_0_alpha1} we preserve the order + * For indices created on or after {@link Version#V_6_5_0} we preserve the order * of the children while ensuring that parents appear after them. */ List newDocs = reorderParent(documents); diff --git a/server/src/test/java/org/elasticsearch/index/mapper/NestedObjectMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/NestedObjectMapperTests.java index 1a7992912dd..6be0894186a 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/NestedObjectMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/NestedObjectMapperTests.java @@ -651,8 +651,8 @@ public class NestedObjectMapperTests extends ESSingleNodeTestCase { .endObject().endObject().endObject()); Version bwcVersion = VersionUtils.randomVersionBetween(random(), Version.V_6_0_0, - Version.V_7_0_0_alpha1.minimumCompatibilityVersion()); - for (Version version : new Version[] {Version.V_7_0_0_alpha1, bwcVersion}) { + Version.V_6_5_0); + for (Version version : new Version[] {Version.V_6_5_0, bwcVersion}) { DocumentMapper docMapper = createIndex("test-" + version, Settings.builder().put(IndexMetaData.SETTING_INDEX_VERSION_CREATED.getKey(), version).build()) .mapperService().documentMapperParser().parse("type", new CompressedXContent(mapping)); @@ -679,7 +679,7 @@ public class NestedObjectMapperTests extends ESSingleNodeTestCase { XContentType.JSON)); assertThat(doc.docs().size(), equalTo(3)); - if (version.onOrAfter(Version.V_7_0_0_alpha1)) { + if (version.onOrAfter(Version.V_6_5_0)) { assertThat(doc.docs().get(0).get(TypeFieldMapper.NAME), equalTo(nested1Mapper.nestedTypePathAsString())); assertThat(doc.docs().get(0).get("nested1.field1"), equalTo("1")); assertThat(doc.docs().get(0).get("nested1.field2"), equalTo("2"));