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

Enable top-docs collection optimizations by default

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      We are getting optimizations when hit counts are not required (sorted indexes, MAXSCORE, short-circuiting of phrase queries) but our users won't benefit from them unless we disable exact hit counts by default or we require them to tell us whether hit counts are required.

      I think making hit counts approximate by default is going to be a bit trappy, so I'm rather leaning towards requiring users to tell us explicitly whether they need total hit counts. I can think of two ways to do that: either by passing a boolean to the IndexSearcher constructor or by adding a boolean to all methods that produce TopDocs instances. I like the latter better but I'm open to discussion or other ideas?

        Attachments

        1. LUCENE-8060.patch
          12 kB
          Adrien Grand
        There are no Sub-Tasks for this issue.

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jpountz Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: