Hi Sachin, You are comparing two different versions. The latest version of Lucene.Net is 2.0 and it got the same APIs as found in Java Lucene 2.0 -- this is the case for all released version of Lucene.Net.
I am in the process of staring the port of Lucene 2.1, then you will see the method which you are referring to. Btw, the correct name of Lucene port is "Lucene.Net", not "DotLucene". Regards, -- George Aroush -----Original Message----- From: Kainth, Sachin [mailto:[EMAIL PROTECTED] Sent: Friday, February 23, 2007 11:40 AM To: [email protected] Subject: Index modification 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.
