lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avi Drissman <avi_driss...@baseview.com>
Subject IndexReader and IndexWriter on the same index
Date Tue, 27 Nov 2001 21:47:26 GMT
In the FAQ in Searching question 41, it says about index 
modification: "The problems are only when you add documents or 
optimize an index, and then search with an IndexReader that was 
constructed before those changes to the index were made."

I'm in a situation where before I add any document I need to remove 
any old versions of it from the index. I'd like to keep both an 
IndexReader and IndexWriter around for efficiency's sake, but I'm 
concerned about them interacting properly. Does the delete(Term) 
member function count as a "search" in the above statement? Can I 
delete with an IndexReader, add with an IndexWriter, delete with that 
IndexReader, add with that IndexWriter, etc. without concern, or must 
I recreate one (or both) of them each time?

Thanks.

Avi
-- 
Avi Drissman
avi_drissman@baseview.com
Bit bashing since 1977

--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message