On Wed, Feb 11, 2009 at 2:56 AM, Michael McCandless
<luc...@mikemccandless.com> wrote:
> IndexWriter can in fact delete documents, by Term or by Query.  It also has
> updateDocument, which under-the-hood simply calls deleteDocuments then
> addDocument.

Awesome that FAQ entry confused me and I didn't look at IndexWriter
javadoc thinking that it wouldn't be there since deleteDocument is
there in IndexReader.

What is the best way to update a document? Search and do an update if
the document is found/else insert or just try an update whatever be
the case - the update will delete in case a document exists or will
just insert a new document if the document doesn't exist in the index.

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

Reply via email to