lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinubalaji Gopal <>
Subject Re: deletes when the writer is open and autocommit is set to false
Date Wed, 11 Feb 2009 15:53:06 GMT
On Wed, Feb 11, 2009 at 2:56 AM, Michael McCandless
<> 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:
For additional commands, e-mail:

View raw message