Re: Converting docid to uid

2024-09-11 Thread Marc Davenport
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()));

Re: Converting docid to uid

2024-08-06 Thread Michael Sokolov
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

Converting docid to uid

2024-08-05 Thread Marc Davenport
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