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

Simplify ExactPhraseScorer

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.10, 6.0
    • core/search
    • None
    • New

    Description

      While looking at this scorer i see a few little things which are remnants of the past:

      • crazy heuristics to use next() over advance(): I think it should just use advance(), like conjunctionscorer. these days advance() isnt stupid anymore
      • incorrect leapfrogging. the lead scorer is never advanced if a subsequent scorer goes past it, it just falls into this nextDoc() loop.
      • pre-next()'ing: we are using cost() api to sort, so there is no need to do that.
      • UnionDocsAndPositionsEnum doesnt follow docsenum contract and set initial doc to -1
      • postingsreader advance() doesnt need to check docFreq > BLOCK_SIZE on each advance call, thats easy to remove.

      So I think really this scorer should just look like "conjunctionscorer that verifies positions on match".

      Attachments

        1. LUCENE-5809.patch
          9 kB
          Robert Muir

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: