Deletes all documents that have a given
CopyC#
term
indexed. 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. See {@link #DeleteDocument(int)} for information about when this deletion will become effective.
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.IndexReader.DeleteDocuments(Lucene.Net.Index.Term)"]

Return Value

the number of documents deleted

See Also