fthevenet commented on code in PR #12212:
URL: https://github.com/apache/lucene/pull/12212#discussion_r1150283780


##########
lucene/facet/src/test/org/apache/lucene/facet/TestDrillSideways.java:
##########
@@ -2039,4 +2012,72 @@ public void testExtendedDrillSidewaysResult() throws 
Exception {
     writer.close();
     IOUtils.close(searcher.getIndexReader(), taxoReader, taxoWriter, dir, 
taxoDir);
   }
+
+  @Test
+  public void testDrillSidewaysSearchUseCorrectIterator() throws Exception {
+    Directory dir = newDirectory();
+    var iwc = new IndexWriterConfig(new Analyzer() {
+      @Override
+      protected Analyzer.TokenStreamComponents createComponents(final String 
fieldName) {
+        var tokenizer = new NGramTokenizer(2, 2);
+        var ts = new LowerCaseFilter(tokenizer);
+        return new Analyzer.TokenStreamComponents(tokenizer::setReader, ts);
+      }
+    });
+
+    var indexWriter = new IndexWriter(dir, iwc);
+    var taxoDir = newDirectory();
+    var taxonomyWriter = new DirectoryTaxonomyWriter(taxoDir);
+    var facetsConfig = new FacetsConfig();
+    facetsConfig.setRequireDimCount("dim1", true);
+    facetsConfig.setDrillDownTermsIndexing("dim1", 
FacetsConfig.DrillDownTermsIndexing.ALL);
+    List.of("Doc btv1b10302599", "Doc btv1b8431298m", "Doc btv1b6935520q", 
"Doc btv1b53054324", "Doc btv1b52507950",

Review Comment:
   It is necessary to have "other" docs that just the one we want to match for 
the problem to arise, though I haven't spent the time to understand exactly how 
many and with what distribution.
   With that said, I have reduced the number of total docs, and changed the 
content of the docs we won't try to match to something simpler with the hope of 
eliminating some of the noise this induced in the code.



-- 
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