lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@apache.org>
Subject Re: Best Practices for Distributing Lucene Indexing and Searching
Date Wed, 09 Mar 2005 18:43:43 GMT
Yonik Seeley wrote:
> This strategy looks very promising.
> 
> One drawback is that documents must be added directly to the main
> index for this to be efficient.  This is a bit of a problem if there
> is a document uniqueness requirement (a unique id field).

This is easy to do with a single index.  Here's the loop:

  1. Poll DB for updated and new documents.
  2. Delete all updated docs from an IndexReader & close it.
  3. Add all new & updated to an IndexWriter & close it.
  4. Tell DB that documents are updated.
  5. Checkpoint index.
  6. Repeat.

Deleting is much faster than adding.

Doug

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message