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

Prevent flattening of ordered and unordered interval sources #13819

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Sep 24, 2024

This commit removes the flattening of ordered and unordered interval sources, as it alters the gap that parent intervals see. For example, ordered("a", ordered("b", "c")) should result in a different gap compared to ordered("a", "b", "c").
The flattening that is currently applied prevent some valid queries to match since the computed gap for ordered and unordered sources are not preserved when combining sources.

Phrase/Block operators will continue to flatten their sub-sources since this does not affect the inner gap (which is always 0 in the case of blocks).

This commit removes the flattening of ordered and unordered interval sources, as it alters the gap visibility for parent intervals. For example, ordered("a", ordered("b", "c")) should result in a different gap compared to ordered("a", "b", "c").

Phrase/Block operators will continue to flatten their sub-sources since this does not affect the inner gap (which is always 0 in the case of blocks).
@jimczi jimczi requested a review from romseygeek September 24, 2024 18:03
Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jimczi jimczi merged commit 82b0804 into apache:main Oct 3, 2024
3 checks passed
@jimczi jimczi deleted the intervals_fix_flattening branch October 3, 2024 11:21
jimczi added a commit that referenced this pull request Oct 3, 2024
This commit removes the flattening of ordered and unordered interval sources, as it alters the gap visibility for parent intervals. For example, ordered("a", ordered("b", "c")) should result in a different gap compared to ordered("a", "b", "c").

Phrase/Block operators will continue to flatten their sub-sources since this does not affect the inner gap (which is always 0 in the case of blocks).
benwtrent added a commit to benwtrent/lucene that referenced this pull request Dec 5, 2024
@benwtrent benwtrent added this to the 10.1.0 milestone Dec 5, 2024
benwtrent added a commit that referenced this pull request Dec 6, 2024
benwtrent added a commit that referenced this pull request Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants