lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <>
Subject Re: document ids in "cached" in Hits and index merge
Date Sat, 25 Jun 2005 15:12:29 GMT

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 


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:
For additional commands, e-mail:

View raw message