jimczi commented on PR #16847:
URL: https://github.com/apache/lucene/pull/16847#issuecomment-6260185845

   Thanks @rmuir, I really like this idea. I gave it a try and it comes out 
cleaner than the `total*()` methods, so I reworked the branch onto it.
   
   `IndexReader#maxDoc()/numDocs()` return `long` now. `LeafReader` keeps the 
`int` under `maxLeafDoc()/numLeafDocs()`. I also put 
`maxLeafDoc()/numLeafDocs()` on `LeafReaderContext`, so per-segment code can 
size a bitset straight from the context without calling `reader()` just to get 
the count.
   
   It breaks the way you described. Anything that needs an `int` stops 
compiling until you use the leaf accessor, so nothing narrows silently. It's a 
wide change but almost all of it is mechanical. Everything is green locally and 
I pushed it to the branch.
   


-- 
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]

Reply via email to