gf2121 commented on code in PR #12912:
URL: https://github.com/apache/lucene/pull/12912#discussion_r1422514730


##########
lucene/backward-codecs/src/test/org/apache/lucene/backward_index/TestBackwardsCompatibility.java:
##########
@@ -2265,4 +2268,47 @@ public void testReadNMinusTwoSegmentInfos() throws 
IOException {
       }
     }
   }
+
+  public static final String[] oldWikiTermsNames = {"wikiterms.9.8.0.zip"};
+
+  public void testCreateWikiTermsIndex() throws Exception {
+    Path indexDir = getIndexDir().resolve("wikiterms");
+    Files.deleteIfExists(indexDir);
+    Directory dir = newFSDirectory(indexDir);
+
+    IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig());
+    BytesRefIterator termsEnum = 
TermsTestUtil.load(TermsTestUtil.WIKI_40000_TERMS_FILE);
+    BytesRef term;
+    while ((term = termsEnum.next()) != null) {
+      Document document = new Document();
+      document.add(new StringField("body", term, Field.Store.NO));
+      writer.addDocument(document);
+    }
+
+    writer.flush();
+    writer.commit();
+    writer.forceMerge(1);
+    writer.close();
+    dir.close();
+
+    // Gives you time to copy the index out!: (there is also
+    // a test option to not remove temp dir...):
+    Thread.sleep(100000);

Review Comment:
   I raised https://github.com/apache/lucene/pull/12914



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to