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

Minimizing intervals can give inaccurate positions for duplicate terms

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 9.0
    • modules/queries
    • None
    • New, Patch Available

    Description

      Minimizing intervals (maybe just ORDERED and AT_LEAST, but not sure) can move sub iterators to non-sub-match position inside match window, but CachingMatchesIterator logic relies on heuristic that any position inside matching interval is a sub-match.

      For example: ORDERED("a", "b", "a") over "a b a" highlights (report sub-matches) only "a <b>b</b> <b>a</b>", and ORDERED("a", "b", "a", "b", "a")  highlights only "a b <b>a</b> <b>b</b> <b>a</b>".

      Looks like there is no way to determine the right moment to cache from caching iterator perspective, so I propose to add an interface allowing minimizing IntervalIterators notify sub-sources positioned at sub-match positions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            khitrin Nikolay Khitrin
            Votes:
            0 Vote for this issue
            Watchers:
            4 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 - 50m
                50m