Deletes all documents containing
CopyC#
term
. This is useful if one uses a document field to hold a unique ID string for the document. Then to delete such a document, one merely constructs a term with the appropriate field and the unique ID string as its text and passes it to this method. Returns the number of documents deleted.
since this reader was opened
has this index open (
CopyC#
write.lock
could not be obtained)

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

Syntax

C#
public virtual int DeleteDocuments(
	Term term
)
Visual Basic
Public Overridable Function DeleteDocuments ( _
	term As Term _
) As Integer
Visual C++
public:
virtual int DeleteDocuments(
	Term^ term
)

Parameters

term
Type: Lucene.Net.Index..::..Term

[Missing <param name="term"/> documentation for "M:Lucene.Net.Index.IndexModifier.DeleteDocuments(Lucene.Net.Index.Term)"]

Return Value

the number of documents deleted

See Also