Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Lucene LUCENE-9620 added a Weight.count API. Solr's DocSet based queries (presently, Filter) can implement the count. It's primarily used by IndexSearcher.count. GraphQueryWeight could implement this too.
FYI SolrIndexSearcher.numDocs is related to IndexSearcher.count in purpose but the overloads declare that filter cache entries will be created/used, and so it's probably not appropriate to change them, as they should continue to cache by side-effect. However, the overload taking (Query a, DocSet b) checks for a lack of a filterCache and it counts in a more manual way. It could be updated to use count(q).