lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshum <ansh...@gmail.com>
Subject Re: Unable to add more than 1 document to Index
Date Thu, 24 Apr 2008 07:00:44 GMT
Hi Hasan,

You had mentioned that you initialized the writer with 'true' as a parameter
so I just thought you went wrong there. Is the problem resolved?
Are you catching any exceptions during the process?

--
Anshum

On Thu, Apr 24, 2008 at 12:06 PM, Hasan Diwan <hasan.diwan@gmail.com> wrote:

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


-- 
--
The facts expressed here belong to everybody, the opinions to me.
The distinction is yours to draw............

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message