lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <>
Subject Re: Best way to Add items to Index in Real Time
Date Wed, 05 Jul 2006 22:23:14 GMT
If you are getting errors while searching and at the same either adding or deleting documents,
chances are you are not using the API correctly and following the concurrency rules (described
many times on this list).  Yo ucan search and modify your index at the same time.  Adding
and deleting documents is best done in batches (e.g. run your deletions first, close IndexReader
that did deletions (could be the same one that is used for searching), open IndexWriter, add
documents, close writer, re-open IndexSearcher/Reader for searching so your changes are visible).


----- Original Message ----
From: gloria_white <>
Sent: Wednesday, July 5, 2006 5:21:29 PM
Subject: Best way to Add items to Index in Real Time

We have a Lucene index of a small size(about 150k items) that requires
additions/deletions several times in a day. We could add or delete 3 to 4k
documents everytime we perform these operations. 
While we perform this operation, we still need to be 'online' and available
for searching. And if we perform these operations while search is going on,
we get conflict errors, causing either the indexing process or the search
operation to fail. 
What is the best way to handle this scenario so that while we can add/delete
documents from index in real time and also allow search to take place?

thanks a lot! 

View this message in context:
Sent from the Lucene - Java Users forum at

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

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

View raw message