Lucene.Net 1.4.3 Class Library

IndexReader.Delete Method

Deletes all documents containing

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.

Overload List

Deletes all documents containing

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.

public int Delete(Term);

Deletes the document numbered

docNum
. Once a document is deleted it will not appear in TermDocs or TermPostitions enumerations. Attempts to read its Field with the {@link #document} method will result in an error. The presence of this document may still be reflected in the {@link #docFreq} statistic, though this will be corrected eventually as the index is further modified.

public void Delete(int);

See Also

IndexReader Class | Lucene.Net.Index Namespace