Add maxValueCount to DocValuesSkipper metadata#15993
Add maxValueCount to DocValuesSkipper metadata#15993iprithv wants to merge 1 commit intoapache:mainfrom
Conversation
jainankitk
left a comment
There was a problem hiding this comment.
I am wondering if this information needs to stored as part of DocValuesSkipper as this should be single value per field per segment right? Also, this PR - #15737 might be related.
Thanks for taking a look. Yes, I put it on |
Description
resolves #15794
DocValuesSkipper#maxValueCount()so consumers can determine whether a doc values field is definitely single-valued without unwrapping iterators.maxValueCountmetadata in Lucene90 doc values skipper metadata for new segments.Compatibility
Older Lucene90 segments do not have this metadata, so
maxValueCount()returns a safe upper bound:0for empty fields andInteger.MAX_VALUEotherwise. Exact values become available once segments are rewritten or merged with the new format.