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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.1, 6.0
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: