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

wasted work in CheckIndex.checkIndex(List)

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.3
    • 4.4, 6.0
    • core/index
    • 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 "CheckIndex.checkIndex(List<String>)", the loop over
      "onlySegments" should not be executed when "infoStream" is "null".
      When "infoStream" is "null" 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.7 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: