There are times when you may need to remove a document from an index. One such case might be if you are implementing a front end similar to SharePoint that allows users to add and remove documents from content libraries that are implemented by a Lucene.NET index. If a user removes a document, it will need to have no effect on future search result scoring or be in the search results.
The primary means of deleting documents from an index is through the
DeleteDocuments method of the
IndexWriter class. There are several overloads of this method, but the basic idea is that, given a term, query, or an array of either, the
IndexWriter object will delete all entries from the index matching those ...