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).
Otis ----- Original Message ---- From: gloria_white <[EMAIL PROTECTED]> To: java-user@lucene.apache.org 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! Gloria -- View this message in context: http://www.nabble.com/Best-way-to-Add-items-to-Index-in-Real-Time-tf1897254.html#a5189803 Sent from the Lucene - Java Users forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]