diff --git a/core/src/main/java/org/elasticsearch/common/lucene/search/Queries.java b/core/src/main/java/org/elasticsearch/common/lucene/search/Queries.java index 31184bb4351..d004c798996 100644 --- a/core/src/main/java/org/elasticsearch/common/lucene/search/Queries.java +++ b/core/src/main/java/org/elasticsearch/common/lucene/search/Queries.java @@ -70,7 +70,7 @@ public class Queries { * @param indexVersionCreated the index version created since newer indices can identify a parent field more efficiently */ public static Query newNonNestedFilter(Version indexVersionCreated) { - if (indexVersionCreated.onOrAfter(Version.V_7_0_0_alpha1)) { + if (indexVersionCreated.onOrAfter(Version.V_6_1_0)) { return new DocValuesFieldExistsQuery(SeqNoFieldMapper.PRIMARY_TERM_NAME); } else { return new BooleanQuery.Builder() diff --git a/core/src/main/java/org/elasticsearch/index/mapper/SeqNoFieldMapper.java b/core/src/main/java/org/elasticsearch/index/mapper/SeqNoFieldMapper.java index 391705d719c..01b302797e2 100644 --- a/core/src/main/java/org/elasticsearch/index/mapper/SeqNoFieldMapper.java +++ b/core/src/main/java/org/elasticsearch/index/mapper/SeqNoFieldMapper.java @@ -255,7 +255,7 @@ public class SeqNoFieldMapper extends MetadataFieldMapper { assert seqID != null; int numDocs = context.docs().size(); final Version versionCreated = context.mapperService().getIndexSettings().getIndexVersionCreated(); - final boolean includePrimaryTerm = versionCreated.before(Version.V_7_0_0_alpha1); + final boolean includePrimaryTerm = versionCreated.before(Version.V_6_1_0); for (int i = 1; i < numDocs; i++) { final Document doc = context.docs().get(i); doc.add(seqID.seqNo); diff --git a/core/src/test/java/org/apache/lucene/search/QueriesTests.java b/core/src/test/java/org/apache/lucene/search/QueriesTests.java index d117b741a2e..9256c8b31a3 100644 --- a/core/src/test/java/org/apache/lucene/search/QueriesTests.java +++ b/core/src/test/java/org/apache/lucene/search/QueriesTests.java @@ -32,7 +32,7 @@ public class QueriesTests extends ESTestCase { // This is a custom query that extends AutomatonQuery and want to make sure the equals method works assertEquals(Queries.newNonNestedFilter(version), Queries.newNonNestedFilter(version)); assertEquals(Queries.newNonNestedFilter(version).hashCode(), Queries.newNonNestedFilter(version).hashCode()); - if (version.onOrAfter(Version.V_7_0_0_alpha1)) { + if (version.onOrAfter(Version.V_6_1_0)) { assertEquals(Queries.newNonNestedFilter(version), new DocValuesFieldExistsQuery(SeqNoFieldMapper.PRIMARY_TERM_NAME)); } else { assertEquals(Queries.newNonNestedFilter(version), new BooleanQuery.Builder()