iprithv commented on PR #15993: URL: https://github.com/apache/lucene/pull/15993#issuecomment-4455114551
@msfroh yes right, this does lean on the DocValuesFormat to actually store the number. But docCount, minValue, and maxValue on the skipper already have that same dependency. The default maxValueCount() returns Integer.MAX_VALUE when the format doesn't know the exact count, so it's a safe fallback. It's just a conservative upper bound. I thought about FieldInfo, but that feels like schema metadata and this is really a per-segment stat. Sticking it on the iterator felt wrong too. That's for walking docs, not for segment-level stats. And computing it on demand is exactly the fragile thing @romseygeek was pointing out in #15794. Yeah, fields without a skipper are out of luck here. But those are usually not the numeric/ordinal fields the issue is about. For fields that do have a skipper, this kills the weird hack where we unwrap SortedNumericDocValues to see if it's secretly a singleton. Thanks! -- 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]
