Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9620

Add Weight#count(LeafReaderContext)

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 9.0
    • None
    • None
    • New

    Description

      We have IndexSearcher#count today, which tries to optimize counting for TermQuery and MatchAllDocsQuery, and falls back to BulkScorer + TotalHitCountCollector otherwise.

      I'm considering moving this to Weight instead, where it'd be a better place to add counting optimizations for other queries, e.g. pure disjunctions over single-valued fields or range queries on points. The default implementation could use a BulkScorer+TotalHitCountCollector like IndexSearcher#count does today.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jpountz Adrien Grand
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 40m
                  4h 40m