Let me try out and get back to you sir Thanks M.Dhivya --- On Fri, 30/10/09, Anshum <ansh...@gmail.com> wrote:
From: Anshum <ansh...@gmail.com> Subject: Re: What is multiple indexing and how does it work in Lucene [Java] To: java-user@lucene.apache.org Date: Friday, 30 October, 2009, 6:23 AM In case you are trying to say that in subsequent runs, the previous state of the index just goes off, its because the indexwriter gets opened with 'create new' flag as true. In other words, the index would be newly created overwriting any existing index at the directory location. The solution to this would be to open the indexwriter with the createnew flag as false. *public IndexWriter(String path,* * Analyzer a,* * boolean create)* * throws IOException* This should solve your problem. -- Anshum Gupta Naukri Labs! http://ai-cafe.blogspot.com The facts expressed here belong to everybody, the opinions to me. The distinction is yours to draw............ On Fri, Oct 30, 2009 at 11:43 AM, DHIVYA M <dhivyakrishna...@yahoo.com>wrote: > The question is indeed wrong. Sry for the inconvenience. Actually i should > have asked this way! > > Am trying out executing the demo of lucene 1.4.3. > When i run a file for the first time, the index is properly getting > created. > When i run the indexing for the second time with a different file, the file > "_1" , a CFS file in the index folder is getting overwritten, i.e. i couldnt > find the index created for the previous file i used. > > So kindly let me know about the cause of this problem and a solution too. > > I would also be happy if anyone let me know from which version the index > will be appended. > > Thanks in advance. > M.Dhivya > > > From cricket scores to your friends. Try the Yahoo! India Homepage! > http://in.yahoo.com/trynew From cricket scores to your friends. Try the Yahoo! India Homepage! http://in.yahoo.com/trynew