lucene-java-user mailing list archives

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

On 23/04/2008, Anshum <anshumg@gmail.com> 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).
-- 
Cheers,
Hasan Diwan <hasan.diwan@gmail.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message