lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DHIVYA M <>
Subject soln found for overwritten problem
Date Fri, 30 Oct 2009 06:27:58 GMT
Let me try out and get back to you sir

--- On Fri, 30/10/09, Anshum <> wrote:

From: Anshum <>
Subject: Re: What is multiple indexing and how does it work in Lucene [Java]
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!

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 <>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!

      From cricket scores to your friends. Try the Yahoo! India Homepage!
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message