Apache Lucene.Net 2.4.0 Class Library API

IndexWriter.UpdateDocument Method (Term, Document, Analyzer)

Updates a document by first deleting the document(s) containing

term
and then adding the new document. The delete and then add are atomic as seen by a reader on the same index (flush may happen only after the add).

public virtual void UpdateDocument(
   Term term,
   Document doc,
   Analyzer analyzer
);

Parameters

term
the term to identify the document(s) to be deleted
doc
the document to be added
analyzer
the analyzer to use when analyzing the document

See Also

IndexWriter Class | Lucene.Net.Index Namespace | IndexWriter.UpdateDocument Overload List