lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <>
Subject Re: parameter create in IndexWriter
Date Thu, 07 Sep 2006 06:23:43 GMT
jacky wrote:
> hi,
>    Today I found a funny thing, if "create" parameter in IndexWriter set false, 
> and there is no index Segements in the Directory before, then an IOException will be

> thrown.
>    I am confused that why not using this logic : if there is a Segments, then append
it, create it otherwise.
>    I know we can do this in the application, but it is complex sometimes.

The reason is that if we don't *want* to create a new text index (e.g.
if the user enters the wrong path to the data) then it shouldn't be
created automatically because it would result in trash ending up all
over the hard disk.


Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web:                        Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

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

View raw message