Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordered intervals over interleaved terms #12213

Closed
hongyuyan97 opened this issue Mar 24, 2023 · 1 comment
Closed

Ordered intervals over interleaved terms #12213

hongyuyan97 opened this issue Mar 24, 2023 · 1 comment
Labels

Comments

@hongyuyan97
Copy link
Contributor

Description

Here is my input text 'A B A C A B C' and search ORDERED(A, B, C)
It should hits [0,3] and [4,6], but it will ignore the [4,6].
The reason is similar to this issue LUCENE-9418.
After finding the first interval [0, 3], the subintervals will become A[0,0], B[1,1], C[3,3]; then the algorithm will try to minimize it and the subintervals will become: A:[2,2], B:[5,5], C:[3,3] (after finding 5 > 3 it breaks the minimization)

And when finding next interval, it will do advance(B) before checking whether it is after A(the do-while loop), so subintervals will become A[2,2], B[inf, inf], C[3,3] and return NO_MORE_INTERVAL.

Based on the paper cited by intervals, I think we should continue the loop from where the last "nextInterval" stopped, rather than always starting from 1.

Later I will file a PR for this.

Version and environment details

Lucene: 8.10.1

@romseygeek
Copy link
Contributor

Fixed by #12214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants