romseygeek commented on code in PR #15993:
URL: https://github.com/apache/lucene/pull/15993#discussion_r3257686865
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90DocValuesProducer.java:
##########
@@ -255,8 +255,15 @@ private DocValuesSkipperEntry
readDocValueSkipperMeta(IndexInput meta) throws IO
long minValue = meta.readLong();
int docCount = meta.readInt();
int maxDocID = meta.readInt();
+ final int maxValueCount;
+ if (version >= Lucene90DocValuesFormat.VERSION_SKIPPER_MAX_VALUE_COUNT) {
+ maxValueCount = meta.readInt();
+ } else {
+ maxValueCount = docCount == 0 ? 0 : Integer.MAX_VALUE;
Review Comment:
I think we can be a bit smarter here? eg, for Numeric/Sorted entries we
know this value is `1`, and for SortedNumeric/SortedSet we can check the
relevant XXEntry and see if `numValues == numDocsWithField` and return `1` for
those cases?
I think I'd prefer returning `-1` to returning `Integer.MAX_VALUE` for cases
where we don't know the exact value to make it clear that the data isn't
available.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]