Skip to content

Add maxValueCount to DocValuesSkipper metadata#15993

Open
iprithv wants to merge 1 commit intoapache:mainfrom
iprithv:dv-skipper-max-count
Open

Add maxValueCount to DocValuesSkipper metadata#15993
iprithv wants to merge 1 commit intoapache:mainfrom
iprithv:dv-skipper-max-count

Conversation

@iprithv
Copy link
Copy Markdown
Contributor

@iprithv iprithv commented Apr 28, 2026

Description

resolves #15794

  • Add DocValuesSkipper#maxValueCount() so consumers can determine whether a doc values field is definitely single-valued without unwrapping iterators.
  • Persist exact global maxValueCount metadata in Lucene90 doc values skipper metadata for new segments.
  • Add validation and test coverage for empty, single-valued, and multi-valued skipper fields.

Compatibility

Older Lucene90 segments do not have this metadata, so maxValueCount() returns a safe upper bound: 0 for empty fields and Integer.MAX_VALUE otherwise. Exact values become available once segments are rewritten or merged with the new format.

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.

Add maxValueCount to DocValuesSkipper metadata

1 participant