The index queue

When your data changes it is likely that you will want to update your Lucene index.

If your index is small and your data changes infrequently, you may be able to justify rebuilding the entire index either when the data does change, or periodically.

However, if you have a large index or your data changes frequently it is more likely that you will want to perform incremental updates on an existing index.

SimpleLucene provides a thread safe queue for storing index tasks. When your data changes, rather than re-indexing immediately (blocking the current thread) you can create an index task and hand it over to the queue. It is then down to you to process the tasks in the queue. We typically have a task running on another thread that periodically processes the items in the queue.

Creating an index task

Last edited Apr 20, 2011 at 2:23 PM by retroviz, version 1


No comments yet.