lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Williams <>
Subject Re: IndexSearcher hanging on to old index files in Windows
Date Fri, 29 Apr 2005 19:02:13 GMT
Monsur Hossain wrote:

>>Just tried this on my linux laptop - with IndexSearcher uncommented, I
>>still get a single .cfs file.
>Hmmm, rereading this, I'm curious to know how/why this works in Linux.
>Consider this scenario:
>1) Create a new index
>2) Create a new IndexSearcher pointing to that index.
>3) Run an incremental index/optimize.  At this point, the new, optimized cfs
>file is created, the old cfs file is deleted, and the segments file is
>updated to point to the new cfs file.
>4) Run a search using the IndexSearcher created in step 2.
>At this point, how does the IndexSearcher know that the segments have been
>updated and that it should try to read from the new cfs file?
It doesn't.  It won't see the changes to the index until you close it 
and open a new one.  On Linux, the IndexSearcher can point to the old 
index although the index directory no longer does.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message