Skip to content

Prevent flattening of ordered and unordered interval sources#13819

Merged
jimczi merged 2 commits intoapache:mainfrom
jimczi:intervals_fix_flattening
Oct 3, 2024
Merged

Prevent flattening of ordered and unordered interval sources#13819
jimczi merged 2 commits intoapache:mainfrom
jimczi:intervals_fix_flattening

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
@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
benchaplin pushed a commit to benchaplin/lucene that referenced this pull request Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants