As long as you use the same Searcher object, you shouldn't see document
ids changing.
When you open a searcher you get a consistent view of the segments that
existed at the time. Merging creates new segments which you won't see
until you create a new searcher.
In short, retrieving hits while indexing and merging works correctly, no
surprises.
B.
jian chen wrote:
Hi,
I have a stupid question regarding the transient nature of the document ids.
As I understand, documents will obtain new doc ids during the index
merge. Suppose if you do a search and got the Hits object. When you
iterate through the documents by id, the index merge happens. How the
merge and new ids created do not mess up the retrieval of Hits
documents?
Could anyone please enlighten me on this synchronization issue?
Thanks a lot,
Jian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]