Min, The only way to update a document is to first delete the existing one, then re-add it. There is no way to retain the same document id when this is done.
Michael -----Original Message----- From: Min Yin [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2008 4:54 PM To: lucene-net-user@incubator.apache.org Subject: How do I update a document without first delete and then add Hi there, Sorry for the naive question, but I couldn't seem to find a way to update a document (i.e., one or multiple fields of a document) without first delete the old one and then add a new one, in other words, I'd like to keep the old document id. But I only find IndexWriter.updateDocument(term, doc) which "Updates a document by first deleting the document(s) containing |term| and then adding the new document". Any idea? Thanks in Advance! Min