Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15899

Use new Weight.count optimization

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • search
    • 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).

      Attachments

        Activity

          People

            Unassigned Unassigned
            dsmiley David Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: