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

Align doc value skipper interval boundaries when an interval contains a constant value #13597

Merged
merged 2 commits into from
Jul 22, 2024

Conversation

iverase
Copy link
Contributor

@iverase iverase commented Jul 22, 2024

Doc values skipper currently creates a new interval every 4096 documents. This can be inefficient in the case that the field has low cardinality and values are sorted. In that case, we might want to align the boundaries for intervals that contains just a single value.

Therefore this change proposes to keep adding documents in an interval if the following conditions apply:

  • The next document is single valued.
  • The interval only contains a single value and next value is the same value
  • The interval is dense and the next document keeps the density.

In this situation we will keep adding documents into the interval until one of the conditions break it.

relates #11432

@iverase iverase requested a review from jpountz July 22, 2024 10:40
Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

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

The change looks good, nice testing.

@iverase iverase merged commit 7709f57 into apache:main Jul 22, 2024
3 checks passed
@iverase iverase deleted the skipper_boundaries branch July 22, 2024 12:52
@iverase iverase added this to the 10.0.0 milestone Jul 24, 2024
linfn pushed a commit to linfn/lucene that referenced this pull request Nov 5, 2024
… a constant value (apache#13597)

keep adding documents to an skipper interval while it is dense and single valued.
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.

2 participants