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
Hello,
Right now our implementation retrieves our UID for our records from the
topdocs by calling IndexSearcher.doc(docid, fieldToLoad) (Deprecated) with
the UID as the only field. I'm looking to replace this with the
appropriate call to IndexSearcher.storedFields(). This feels a little
inefficie