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

Correctly handle repeats in ordered and unordered intervals

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.5
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      If you have repeating intervals in an ordered or unordered interval source, you currently get somewhat confusing behaviour:

      • ORDERED(a, a, b) will return an extra interval over just `a b` if it first matches `a a b`, meaning that you can get incorrect results if used in a CONTAINING filter - CONTAINING(ORDERED(x, y), ORDERED(a, a, b)) will match on the document `a x a b y`
      • UNORDERED(a, a) will match on documents that just containg a single `a`.

      It is possible to deal with the unordered case when building sources by rewriting duplicates to nested ORDERED clauses, so that UNORDERED(a, b, c, a, b) becomes UNORDERED(ORDERED(a, a), ORDERED(b, b), c), but this then breaks MAXGAPS filtering.

      We should try and fix this within intervals themselves.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m