Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
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.