kkewwei opened a new issue, #14755:
URL: https://github.com/apache/lucene/issues/14755

   ### Description
   
   When only boo-filter condition is present, the number of documents collected 
may exceed the `totalHitsThreshold`, we will not use  `ConstantScoreScorer` to 
prune the `DocIdSetIterator` to `Empty`.
   
   How to reproduce:
   ```
           IndexReader indexReader = DirectoryReader.open(directory);
           IndexSearcher searcher = new IndexSearcher(indexReader);
           TermQuery termQuery = new TermQuery(new Term("city", "city4"));
   
           BooleanQuery.Builder builder = new BooleanQuery.Builder();
           builder.add(termQuery, BooleanClause.Occur.FILTER);
   
           Query indexQuery = LongPoint.newRangeQuery("size", 1, 
Long.MAX_VALUE);
           builder.add(indexQuery, BooleanClause.Occur.FILTER);
   
           TopScoreDocCollectorManager topScoreDocCollectorManager = new 
TopScoreDocCollectorManager(10, null, 10_000);
           Collector collector = topScoreDocCollectorManager.newCollector();
           searcher.search(builder.build(), collector);
           System.out.println(collector);
   ```
   
   
![Image](https://github.com/user-attachments/assets/f355ead4-de7c-4477-8607-f8e2419ff35d)
   
   ### Version and environment details
   
   _No response_


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