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

wasted work in Lucene40TermVectorsWriter.finishTerm()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.3
    • 4.4, 6.0
    • core/codecs
    • any

    • New, Patch Available

    Description

      The problem appears in version 4.3.0 and in revision 1490286. I
      attached a two-line patch that fixes it.

      In method "Lucene40TermVectorsWriter.finishTerm", the loop over
      "offsetStartBuffer" should not be executed when "offsets" is "false".
      When "offsets" is "false" the loop produces no results. The patch
      just flips the order of the "if" and "for" statements.

      Method "collect" in class "MultiComparatorNonScoringCollector" has a
      similar loop (the last loop in the method over "comparators"), and
      this loop is not executed when "queueFull" is false, just like in the
      proposed patch.

      Attachments

        1. patch.diff
          0.8 kB
          Adrian Nistor

        Activity

          People

            Unassigned Unassigned
            adriannistor Adrian Nistor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: