Hi, 

> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Stephane Bailliez
> 
> What I would like to is something like: if the index does not 
> exist, then create one for me, otherwise use it.

Look at IndexReader.indexExists method.

Your code will be like this:

bool createIndex = ! (IndexReader.indexExists(directory));
writer = new IndexWriter(directory, analyzer, createIndex );

Pasha Bizhan
http://lucenedotnet.com 



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

Reply via email to