4
votes

Am using Lucene.Net.dll, version 2.0.0.4.

Looks like its IndexWriter class does not have methods for DeleteDocument or UpdateDocument. Am i missing something here? How do I achieve delete, update functionality in this version of Lucene.Net?

Version 2.1 Lucene.dll seems to have support for delete and update documents:

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

In here is the source code for verion 2.1, but I will have to download all the files one by one and then build a DLL out of it.

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

2

2 Answers

2
votes

In older version of Lucene, deleting documents could only be done with an IndexReader. To update a document, simply delete the old version and add a new one.

I don't know about the dll download, sorry.