pquentin opened a new pull request #445: URL: https://github.com/apache/lucene/pull/445
# Description Now that we require all documents to use the same features (LUCENE-9334), implement `Weight#count()` to return `docCount` if either terms or points are indexed. # Solution After instructions from @jpountz, I've added `Weight#count()` that returns the document count if points are indexed. # Tests I've adapted `TestTermQuery#testQueryMatchesCount()` into `TestDocValuesFieldExistsQuery`. The test correctly exercises the `searcher.count` case, but `weight.count` returns -1 as `getPointDimensionCount` always returns 0. Why isn't my field indexed? # Checklist - [ ] Fix current test - [ ] Test terms in addition to points - [ ] Validate that this improves performance in a synthetic benchmark -- 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