Oops, didn't read the OP quite well...
2009/6/19 Anshum :
> Exactly, its cleaner but you wouldn't be able to delete on the basis of
> Lucene Document ID.
>
> --
> Anshum Gupta
> Naukri Labs!
> http://ai-cafe.blogspot.com
>
> The facts expressed here belong to everybody, the opinions to me. The
> d
Hi,
thank you all for your answers. I already done the strategies you mencioned
by delete first and update or using the internal api updateDocument(term,
document).
If there was a updateDocument(internalid, theNewDocument) present
in the api, this clarified more the process.
Thanks again, for you
Exactly, its cleaner but you wouldn't be able to delete on the basis of
Lucene Document ID.
--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com
The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw
On Fri, Jun 19, 2009 at 1:26 PM, Da
There's also IndexWriter#updateDocument(Term, Document) now, to use
that one you need to be able to uniquely identify a document using a
term (probably with an application-specific id field or something).
This method does also delete and readd the document, but it is a
somewhat cleaner api.
Daan
HI Galaio,
To update a document in lucene this way, you'd have to first delete the
document
using indexReader's delete document and then readd the document (thereby
changing the internal docId as well).
You may use:
http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/index/IndexReader.html#de