lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hasan Diwan" <>
Subject Re: Unable to add more than 1 document to Index
Date Thu, 24 Apr 2008 06:36:49 GMT

On 23/04/2008, Anshum <> wrote:
>  The issue seems to be with the initialization of the index writer, try
>  initializing it with a the last parameter as false i.e.
>  *writer = new IndexWriter(indexLocation, new StandardAnalyzer(), false);

writer = new IndexWriter(indexLocation, new StandardAnalyzer());

>  *If you initialize it with the last argument as true, it creates a new
>  index  each time @ the index location.
>  With the last argument as 'false' you would be able to append data to the
>  existing index.

if you don't provide the last argument, it does what it logically
should (create new index unless one exists).
Hasan Diwan <>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message