Updates a document by first deleting the document(s)
containing 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).
NOTE: if this method hits an OutOfMemoryError
you should immediately close the writer. See above for details.
Namespace: Lucene.Net.IndexCopyC#
term
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
C# |
---|
public virtual void UpdateDocument( Term term, Document doc, Analyzer analyzer ) |
Visual Basic |
---|
Public Overridable Sub UpdateDocument ( _ term As Term, _ doc As Document, _ analyzer As Analyzer _ ) |
Visual C++ |
---|
public: virtual void UpdateDocument( Term^ term, Document^ doc, Analyzer^ analyzer ) |
Parameters
- term
- Type: Lucene.Net.Index..::..Term
the term to identify the document(s) to be deleted
- doc
- Type: Lucene.Net.Documents..::..Document
the document to be added
- analyzer
- Type: Lucene.Net.Analysis..::..Analyzer
the analyzer to use when analyzing the document