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

Logic error in Intervals.or() can cause endless loop

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.6, 8.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      An intervals source of the following type:

      IntervalsSource source = Intervals.ordered(
        Intervals.or(Intervals.term("term1"), Intervals.term("term2")),
        Intervals.term("term3"))

      can cause an infinite loop when queried, due to a bug in the 'no more intervals' logic in DisjunctionIntervalIterator

        Attachments

        1. LUCENE-8586.patch
          3 kB
          Alan Woodward

          Activity

            People

            • Assignee:
              romseygeek Alan Woodward
              Reporter:
              romseygeek Alan Woodward
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: