Deleting and updating documents in the Lucene index

We use Lucene.Net.dll , version 2.0.0.4.

It seems that the IndexWriter class IndexWriter not have methods for DeleteDocument or UpdateDocument . Did I miss something? How to achieve removal, updating functions in this version of Lucene.Net?

Version 2.1 Lucene.dll seems to support deletion and update documents:

 public virtual void DeleteDocuments(Term term); public virtual void UpdateDocument(Term term, Document doc); 

The here is the source code for version 2.1, but I will have to download all the files one at a time, and then create the DLL from it.

Can I download the latest Lucene.dll and Highlighter from some site?

+4
source share
2 answers

In the old version of Lucene, deletion of documents can only be done using IndexReader . To update a document, simply uninstall the old version and add a new one.

I do not know about loading dll, sorry.

+2
source

All Articles