You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Gagandeep singh <ga...@gmail.com> on 2013/09/11 07:11:41 UTC

org.apache.lucene.index.CorruptIndexException: Corrupted: docID=582140, docBase=0, chunkDocs=0, numDocs=649475

Hi folks

I have a Solr (version 4.3) index where i'm getting this exception when i
try to run a mapreduce:
Caused by: org.apache.lucene.index.CorruptIndexException: Corrupted:
docID=582140, docBase=0, chunkDocs=0, numDocs=649475
        at
org.apache.lucene.codecs.compressing.CompressingStoredFieldsReader.visitDocument(CompressingStoredFieldsReader.java:203)
        at
org.apache.lucene.index.SegmentReader.document(SegmentReader.java:133)
        at
org.apache.lucene.index.BaseCompositeReader.document(BaseCompositeReader.java:110)
        at
org.apache.lucene.index.IndexReader.document(IndexReader.java:436)
        at
org.apache.solr.search.SolrIndexSearcher.doc(SolrIndexSearcher.java:640)
        at
org.apache.solr.search.SolrIndexSearcher.doc(SolrIndexSearcher.java:568)
        at
com.bloomreach.cpa.JaccardSimilarityQuery.computeScore(JaccardSimilarityQuery.java:78)
        ... 42 more

However, when i use luke handler (/solr/admin/luke?docId=582140) to see the
doc, it shows up nicely. I can search for its url in the browse UI and see
the document as well.

Why is searcher.doc() throwing an exception ?

Thanks
Gagan

Re: org.apache.lucene.index.CorruptIndexException: Corrupted: docID=582140, docBase=0, chunkDocs=0, numDocs=649475

Posted by Adrien Grand <jp...@gmail.com>.
The luke request handler and your JaccardSimilarityQuery use the same
API to retrieve documents (according to the stack trace) so I'm
surprised that you see errors in one case only. Are you sure you are
looking at the same documents? If background merges happened between
your M/R job and your request to the luke request handler, it could be
that document IDs have been re-assigned. Ideally, you should run
CheckIndex[1] on your indices to make sure everything is fine.

[1] http://lucene.apache.org/core/4_3_1/core/org/apache/lucene/index/CheckIndex.html

-- 
Adrien

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