I'm planning to write a listener which will recieve messages from our indexing application via SOAP - the message will indicate which indexes have been updated as we will be using quite a few separate lucene indexes. No point dropping all the searchers (and any caches, filters etc) if only one index has been modified.
Some will be updated frequently - in which case we will have a scheduled optimisation and close of any searchers rather than doing it every time - and others will be infrequent, but contain large updates. ----- Original Message ---- From: Yonik Seeley <[EMAIL PROTECTED]> To: [email protected] Sent: Sunday, 14 May, 2006 3:50:27 PM Subject: Re: IndexUpdateListener On 5/14/06, karl wettin <[EMAIL PROTECTED]> wrote: > To me it feels as the index is the > only thing that knows for sure if it has been updated. I guess that would be whenever an IndexReader that had new deletions is closed, or an IndexWriter that changed the segments file? An app using Lucene still needs to coordinate all the activity surrounding IndexReaders and IndexWriters, including explicit closure, so the app will know anyway when the index has changed, right? (unless you are talking about adding the callbacks to IndexModifier) There are other tricky issues involved as well... would the listeners be called in a synchronized context or not... It really depends what you use the listeners for. Solr uses listeners to snapshot an index for distribution, and hence it needs to be synchronized (no other index modifications allowed while the callback is in progress). Other listeners can be long running and asynchronous. -Yonik http://incubator.apache.org/solr Solr, the open-source Lucene search server --------------------------------------------------------------------- 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]
