You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by arminder01 <ar...@quark.com> on 2013/10/28 22:21:41 UTC

Lucene Corrupt Index Exception

Hi,

We have integrated Lucene with our program and one of the user is facing the
Lucene Corrupt Index Exception. When I ran the CheckIndex command, I got the
following result...




followed by...



Any idea what could have caused this index corruption? I will fix the index
using the CheckIndex command, but the question is why did the index get
corrupted in the first place.

Thanks!




--
View this message in context: http://lucene.472066.n3.nabble.com/Lucene-Corrupt-Index-Exception-tp4098138.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene Corrupt Index Exception

Posted by Michael McCandless <lu...@mikemccandless.com>.
Hmm I still don't see the details in your email, but clicking through
to Nabble I could see them:

2 of 8: name=_1bs4 docCount=19
    compound=true
    hasProx=true
    numFiles=2
    size (MB)=0.017
    diagnostics = {optimize=false, mergeFactor=10, os.version=6.1, os=Windows Se
rver 2008 R2, lucene.version=3.1.0 1085809 - 2011-03-26 17:59:57, source=merge,
os.arch=amd64, java.version=1.6.0_29, java.vendor=Sun Microsystems Inc.}
    has deletions [delFileName=_1bs4_7.del]
    test: open reader.........FAILED
    WARNING: fixIndex() would remove reference to this segment; full exception:
java.lang.AssertionError: delete count mismatch: info=7 vs BitVector=0
        at org.apache.lucene.index.SegmentReader.checkDeletedCounts(SegmentReade
r.java:609)
        at org.apache.lucene.index.SegmentReader.loadDeletedDocs(SegmentReader.j
ava:624)
        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:582)
        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:556)
        at org.apache.lucene.index.CheckIndex.checkIndex(CheckIndex.java:475)
        at org.apache.lucene.index.CheckIndex.main(CheckIndex.java:898)


followed by...

WARNING: 1 broken segments (containing 19 documents) detected
WARNING: 19 documents will be lost

Somehow the deletions file (_1bs4_7.del) thinks there are 0 deleted
docs in this segment (which is weird: if that were true then this file
would not have been written), vs the 7 deleted docs recorded in the
segments file.  If you had passed -fix to CheckIndex it would drop
that one segment (and all docs it contains) from the index.

Did anything unusual happen during indexing?

Are you using IndexReader.undeleteAll?

Also, 3.1.0 is quite old now ... it could be you're hitting a bug that
was already fixed in later versions.

Mike McCandless

http://blog.mikemccandless.com


On Mon, Oct 28, 2013 at 6:57 PM, arminder01 <ar...@quark.com> wrote:
> Hi Mike,
>
> Thanks for your reply. I have removed the raw formatting from the text.
> Please let me know if you can see the complete text now.
>
> Thanks!
> Armin
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Lucene-Corrupt-Index-Exception-tp4098138p4098152.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene Corrupt Index Exception

Posted by arminder01 <ar...@quark.com>.
Hi Mike,

Thanks for your reply. I have removed the raw formatting from the text.
Please let me know if you can see the complete text now.

Thanks!
Armin



--
View this message in context: http://lucene.472066.n3.nabble.com/Lucene-Corrupt-Index-Exception-tp4098138p4098152.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene Corrupt Index Exception

Posted by Michael McCandless <lu...@mikemccandless.com>.
Hi, I only see whitespace under "following result..." and "followed by...".

Were there any interesting exceptions during indexing?

Mike McCandless

http://blog.mikemccandless.com


On Mon, Oct 28, 2013 at 5:21 PM, arminder01 <ar...@quark.com> wrote:
> Hi,
>
> We have integrated Lucene with our program and one of the user is facing the
> Lucene Corrupt Index Exception. When I ran the CheckIndex command, I got the
> following result...
>
>
>
>
> followed by...
>
>
>
> Any idea what could have caused this index corruption? I will fix the index
> using the CheckIndex command, but the question is why did the index get
> corrupted in the first place.
>
> Thanks!
>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Lucene-Corrupt-Index-Exception-tp4098138.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org