Error with :create => true and existing index

I implemented a “reindex” command which simply creates an IndexWriter
with :create => true for a prexisting index.

The “reindexing” seems to start out ok, with several thousand docs
added, then Ferret throws an exception:

IO Error occured: couldn’t rename file “index_0.tmp” to “index_0.cfs”:

I guess that _0.cfs is held open by an IndexReader, so the :create is
failing to delete it and hence the rename is failing.

Kind Regards

Neville

On 9/22/06, Neville B. [email protected] wrote:

failing to delete it and hence the rename is failing.

Kind Regards

Neville

Hi Neville,

Probably a good guess. That is why you need to close your IndexReader
when you finish with it.

I’m not sure if you are asking for a confirmation that this was the
problem or looking for a solution. Let me know if closing all
IndexReaders doesn’t fix the error.

Cheers,
Dave