lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hu Pan <>
Subject Re: rename bug
Date Tue, 26 Jul 2005 00:34:29 GMT

 I have downloaded the source code and use File renameTo to do the rename instead of input/output
stream copying. Things are working under Windows. Is it possible to check OS type and call
the correct methods? Anyway, I would put up a blog when having time so that people can search
for the solution. :-)
----- Original Message ----
From: Chris Lu <>
Sent: Mon Jul 25 17:22:50 2005
Subject: Re: rename bug

This is actually a known problem, particular to windows OS.
I remember Doug Cuttings has talked about it before.

Inside Lucene, the get-around is to try to rename the file until successful.

The IOException you saw may not affect your indexes' integrity. But I
said so just based on experience, not thoroghly tested.

There was a patch for this, but somehow it's not made into Lucene
1.4.3, or the latest dev version, AFAIK.

Chris Lu
Full-Text Search on Any Database

On 7/25/05, Thomas Pan <> wrote:
> Run a small indexer within Eclipse 3.1 under Windows and encounter
> rename bug all the time:
> Cannot rename to deletable
>     at
>     at
> org.apache.lucene.index.IndexWriter.writeDeleteableFiles(
>     at
> org.apache.lucene.index.IndexWriter.deleteSegments(
>     at org.apache.lucene.index.IndexWriter.access$200(
>     at org.apache.lucene.index.IndexWriter$3.doBody(
>     at$
>     at
> org.apache.lucene.index.IndexWriter.mergeSegments([4751]Add
> 655:ACKHQ.OB:Armstrong Holdings Inc !
>     at
> org.apache.lucene.index.IndexWriter.maybeMergeSegments(
>     at org.apache.lucene.index.IndexWriter.addDocument(
>     at org.apache.lucene.index.IndexWriter.addDocument(
> The version of Lucene is 1.4.3. The Java class only has one main method
> implemented. Any clue?
> -Thomas
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

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

View raw message