[
https://issues.apache.org/jira/browse/LUCENE-10140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17422853#comment-17422853
]
Nikolay Khitrin commented on LUCENE-10140:
------------------------------------------
I'm afraid, it will not cover complex sub-intervals cases (multiterms: "ab* b
a*" and sub-phrases, for example).
REPEATING cannot produce all the possible spans between sub-intervals (will
lead to quadratic complexity), but only consecutive pairs of interval
instances, which means that CONTAINS(REPEATING("a", 2), ORDERED("b", GAP, "c"))
cannot match over "a b a c a", but ORDERED("a", "b", GAP, "c", "a") can.
Current caching also have an issue with calling endPosition() after
nextInterval() == false (LUCENE-10075).
> Minimizing intervals can give inaccurate positions for duplicate terms
> ----------------------------------------------------------------------
>
> Key: LUCENE-10140
> URL: https://issues.apache.org/jira/browse/LUCENE-10140
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/queries
> Reporter: Nikolay Khitrin
> Priority: Minor
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]