lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mindaugas Žakšauskas" <>
Subject Re: Runtime exception when creating IndexSearcher
Date Wed, 29 Oct 2008 14:04:10 GMT
Hi Erick,

Sorry for not providing the context. The problem is that I couldn't
work out the exact test case for causing this - I will definitely post
one if I find. There's a possible cause for this but I don't want to
speculate as I don't know for sure.

Just to answer (some of) your questions, this error has nothing to do
with migration, closing, etc. and this only occurred on v2.4.0. As you
can probably see from the stack trace, I'm simply opening an
IndexSearcher. If anyone's interested, I can post compressed folder
with index files (3Mb uncompressed) which are causing trouble.

Currently, a very basic test on this folder fails with the same exception:


public class Test {
 public static void main( String[] args ) throws Exception {
    new IndexSearcher(
"/home/mindas/temp/luke/collection_32/checkedout_index" );

My point of this post was - should the constructor ever throw this
exception? Can this not be gracefully swallowed and handled inside?


On Wed, Oct 29, 2008 at 12:51 PM, Erick Erickson
<> wrote:
> Well, I'd expect it to throw this error if you tried to close
> an already-closed FSDirectory, But that's pretty useless since
> you don't provide much context around your problem.
> Did this just start occurring? Did you just migrate to 2.4 from
> a previous version? Are you sure you aren't closing an already-
> closed FSDir? What was the last thing you changed before
> you saw this behavior? Did it ever work?
> Best
> Erick
> On Wed, Oct 29, 2008 at 8:42 AM, Mindaugas Žakšauskas <>wrote:
>> Hi,
>> We're using Lucene 2.4.0 on Linux. Java version is 1.6.0_06.
>> Is there any reason why Lucene would be throwing this error:
>> this Directory is closed
>>        at
>>        at
>>        at
>> org.apache.lucene.index.SegmentInfos$
>>        at
>>        at
>>        at
>>        at
>>        <..our own code which calls new IndexSearcher( String ) ..>
>> If the index would be corrupted I'd expect
>> org.apache.lucene.index.CorruptIndexException; similar for
>>, however this is something different.
>> Obviously, AlreadyClosedException is a runtime exception and doesn't
>> have to be declared in constructor javadoc, however, the problem is a
>> bit scary as it leaves me in a position with no choice.
>> Thanks is advance.
>> Regards,
>> Mindaugas
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

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

View raw message