I think the 'create' flag really indicates whether it's ok
to *overwrite* the *possibly*existing* index.
Despite the tricky nuance it works great.

http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/index/IndexWriter.html#IndexWriter(org.apache.lucene.store.Directory,%20org.apache.lucene.analysis.Analyzer,%20boolean)

[EMAIL PROTECTED] wrote:

> Hi there,
>
> I'm testing Lucene after reading a good article on it on JavaWorld.
>
> Lucene seems quite simple and very powerful, but there's something I can't get.
> The first time an application uses an index, this one doesn't exist yet, so the
> boolean argument of the IndexWriter constructor must be true (creating a new
> empty index). Next time the same app is started, I want to use the existing
> index, the boolean argument must be false. Here is my question : how do I know
> wether the index exists or not ??  Is there a way to create an IndexWriter on a
> given index, creating it only if needed ?
>
> It seems like a stupid question, I must have missed something...
>
> Thanks
>
> JCG
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
http://www.tropo.com/



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to