jpountz commented on code in PR #13067:
URL: https://github.com/apache/lucene/pull/13067#discussion_r1478307290


##########
lucene/backward-codecs/src/test/org/apache/lucene/backward_index/TestIndexSortBackwardsCompatibility.java:
##########
@@ -82,14 +84,20 @@ public void testSortedIndexAddDocBlocks() throws Exception {
             .setOpenMode(IndexWriterConfig.OpenMode.APPEND)
             .setIndexSort(sort)
             .setMergePolicy(newLogMergePolicy());
+    if (this.version.onOrAfter(FIRST_PARENT_DOC_VERSION)) {
+      indexWriterConfig.setParentField(PARENT_FIELD_NAME);
+    }
     // open writer
     try (IndexWriter writer = new IndexWriter(directory, indexWriterConfig)) {
       // add 10 docs
       for (int i = 0; i < 10; i++) {
         Document child = new Document();
         child.add(new StringField("relation", "child", Field.Store.NO));
         child.add(new StringField("bid", "" + i, Field.Store.NO));
-        child.add(new NumericDocValuesField("dateDV", i));
+        if (version.onOrAfter(FIRST_PARENT_DOC_VERSION)
+            == false) { // only add this to earlier versions
+          child.add(new NumericDocValuesField("dateDV", i));
+        }

Review Comment:
   Why do we need this change?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to