Hi all,

It seems that DotLucene's IndexWriter class does not have the index
modification features (such as deletion of documents from the index)
that the Java version's IndexWriter class does.  For this reason I am
using the IndexModifier class.  I have deleted 1 document from an index
and the output indicates that 1 document does indeed get deleted.
However, running the program again reveals that the document deleted has
appeared again in the index.  This despite the fact that I close the
IndexModifier after the deletion.  Does anyone know what I'm missing?
Here is my code:

        Analyzer analyzer = new PorterAnalyzer();
            IndexModifier indexModifier = new IndexModifier("D:\\Index",
analyzer, false);
            Console.WriteLine(indexModifier.DocCount() + " docs in
index");
            //indexModifier.Delete(1);
            indexModifier.Delete(new Term("artist", "hot"));
            Console.WriteLine("Deleted a document");
            Console.WriteLine(indexModifier.DocCount() + " docs in
index");
            indexModifier.Close();



This email and any attached files are confidential and copyright protected. If 
you are not the addressee, any dissemination of this communication is strictly 
prohibited. Unless otherwise expressly agreed in writing, nothing stated in 
this communication shall be legally binding.

The ultimate parent company of the Atkins Group is WS Atkins plc.  Registered 
in England No. 1885586.  Registered Office Woodcote Grove, Ashley Road, Epsom, 
Surrey KT18 5BW.

Consider the environment. Please don't print this e-mail unless you really need 
to. 

Reply via email to