Re: Runtime exception when creating IndexSearcher

2008-10-29 Thread Michael McCandless
OK I created this issue: https://issues.apache.org/jira/browse/LUCENE-1430 Mike Mindaugas Žakšauskas wrote: Hi, see my comments between Mike's text: On Wed, Oct 29, 2008 at 4:05 PM, Michael McCandless <[EMAIL PROTECTED]> wrote: Hmm, so somehow your stored fields file is truncated --

Re: Runtime exception when creating IndexSearcher

2008-10-29 Thread Michael McCandless
Actually, compound file defaults to true. One odd thing about your index: it has a single segment with 0 docs. What was the history that led to this index? Did you create an index, and then delete all of its documents, and optimize that? Or... something else? Mike Mindaugas Žakšauska

Re: Runtime exception when creating IndexSearcher

2008-10-29 Thread Mindaugas Žakšauskas
Hi, see my comments between Mike's text: On Wed, Oct 29, 2008 at 4:05 PM, Michael McCandless <[EMAIL PROTECTED]> wrote: > > Hmm, so somehow your stored fields file is truncated -- FieldsReader was > unable to read the first int. > > Are you using compound file format in this index? I'm not calli

Re: Runtime exception when creating IndexSearcher

2008-10-29 Thread Michael McCandless
Hmm, so somehow your stored fields file is truncated -- FieldsReader was unable to read the first int. Are you using compound file format in this index? Do you have any idea how your index may have become corrupt? Do you still have the original corrupt (not yet fixed) index? If so can yo

Re: Runtime exception when creating IndexSearcher

2008-10-29 Thread Mindaugas Žakšauskas
Hi, Following Mike's advice, the actual (non-masked exception using Directory constructor) was as following: Exception in thread "main" java.io.IOException: read past EOF at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:151) at org.apache.lucene.store

Re: Runtime exception when creating IndexSearcher

2008-10-29 Thread Michael McCandless
I think I see how this exception can happen. I think you are hitting a different exception, which is masked by the exception you're seeing. Can you run CheckIndex on this index? I think that should show the actual root cause. I think another simple way to see the root cause would be to

Re: Runtime exception when creating IndexSearcher

2008-10-29 Thread Mindaugas Žakšauskas
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, th

Re: Runtime exception when creating IndexSearcher

2008-10-29 Thread Erick Erickson
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 al

Runtime exception when creating IndexSearcher

2008-10-29 Thread Mindaugas Žakšauskas
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: org.apache.lucene.store.AlreadyClosedException: this Directory is closed at org.apache.lucene.store.Directory.ensureOpen(Directory.java:220) at org.apache