Skip to content

Use RangeIntoBitSet for DocValues without skip indexes - #16897

Open
kkewwei wants to merge 4 commits into
apache:mainfrom
kkewwei:intobit_with_no_skip
Open

kkewwei wants to merge 4 commits into
apache:mainfrom
kkewwei:intobit_with_no_skip

Conversation

@kkewwei

@kkewwei kkewwei commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

DocValues range query currently use DocValuesValueRangeIterator when no DocValuesSkipper is available. Its default intoBitSet implementation is predicating doc by doc, even though NumericDocValues, SortedNumericDocValues and SortedDocValues already provide bulk range APIs.

This change allows DocValuesValueRangeIterator to use an optional bulk range when no skipper is available.

It enables the classes:

  • NumericDocValues.rangeIntoBitSet
  • SortedNumericDocValues.rangeIntoBitSet
  • SortedDocValues.ordinalRangeIntoBitSet

Once the current PR is merged, I will enable SortedSetDocValues.ordinalRangeIntoBitSet with #16869.

While testing this change, I encountered a test failure caused by an overflow when transforming query bounds for GCD-encoded DocValues #16896, so this change depends on that fix.

Benchmark

I use SortedNumericDocValuesRangeQueryBenchmark to test without skip indexes:

Density Selectivity Baseline Candidate Improvement
Dense 0.01 28.70 ops/s 34.52 ops/s +20.3%
Dense 0.1 25.69 ops/s 31.59 ops/s +22.9%
Dense 0.5 29.17 ops/s 37.67 ops/s +29.1%
Sparse 0.01 34.23 ops/s 43.08 ops/s +25.8%
Sparse 0.1 33.19 ops/s 39.27 ops/s +18.3%
Sparse 0.5 33.61 ops/s 44.99 ops/s +33.9%

gains ranging from 18.3% to 33.9%, with no performance regression was observed.

@kkewwei

kkewwei commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Also waiting #16952 to be merged to solve the test failure.

@github-actions

Copy link
Copy Markdown
Contributor

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions Bot added the Stale label Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant