Hello,
To close the circle on this. I found that using the docvalues for this was
on the order of 10x faster for our purposes.
Snippet that someone might find useful in the future:
LeafReaderContext context =
indexReader.leaves().get(ReaderUtil.subIndex(docId, indexReader.leaves()));
You could switch to DocValues, and it would probably be more efficient
if you are only retrieving a single stored field but you have a lot of
other ones in the index since stored fields are stored together and
have to be decoded together. As far as visiting every segment on disk
I'm not sure what