Updates a document by first deleting the document(s) containing
CopyC#
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).

NOTE: if this method hits an OutOfMemoryError you should immediately close the writer. See above for details.

Namespace: Lucene.Net.Index
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public virtual void UpdateDocument(
	Term term,
	Document doc
)
Visual Basic
Public Overridable Sub UpdateDocument ( _
	term As Term, _
	doc As Document _
)
Visual C++
public:
virtual void UpdateDocument(
	Term^ term, 
	Document^ doc
)

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

See Also