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

don't decode freqs or enumerate all positions, when scores are not needed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Today if you don't call score() some things are faster, we won't invoke similarity or read the norm for the document or other things.

      On the other hand, its sad in this case that we are decompressing twice as many packed integers as we need (freqs can be skipped over, and our postings lists supports that) and walking all positions in phrase matching to determine the number of times the phrase matched (1 is enough, then we can stop).

      When scoring is not needed, things can be optimized in other cases too (e.g. thats the whole concept of filters).

        Attachments

        1. LUCENE-6218.patch
          116 kB
          Robert Muir
        2. LUCENE-6218.patch
          108 kB
          Robert Muir
        3. LUCENE-6218.patch
          95 kB
          Robert Muir

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rcmuir Robert Muir
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: