gsmiller commented on code in PR #12212: URL: https://github.com/apache/lucene/pull/12212#discussion_r1149888403
########## 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: Do we need all these docs to reproduce the bug, or can we get away with simplifying a bit? ########## 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) { Review Comment: Is it possible to add the content you care about directly to the doc as `StringField` instances and not bring in a dependency on the analysis module? -- 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