ArrayIndexOutOfBoundsException occurs in ZoieSegmentReader

Description

严重: Full Import failed:java.lang.ArrayIndexOutOfBoundsException: 407
at proj.zoie.api.ZoieSegmentReader.getUID(ZoieSegmentReader.java:237)
at proj.zoie.solr.ZoieUpdateHandler$1.collect(ZoieUpdateHandler.java:182)
at org.apache.lucene.search.Scorer.score(Scorer.java:90)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:383)
at proj.zoie.solr.ZoieUpdateHandler.deleteByQuery(ZoieUpdateHandler.java:171)
at org.apache.solr.update.processor.RunUpdateProcessor.processDelete(RunUpdateProcessorFactory.java:71)
at org.apache.solr.update.processor.LogUpdateProcessor.processDelete(LogUpdateProcessorFactory.java:137)
at org.apache.solr.handler.dataimport.SolrWriter.doDeleteAll(SolrWriter.java:200)
at org.apache.solr.handler.dataimport.DocBuilder.cleanByQuery(DocBuilder.java:1062)
at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:186)
at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:359)
at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:427)
at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:408)

I think the getUID method should be changed as the following.
@Override
public long getUID(int docid)
{
if (docid >= _uidArray.length) {
return -1;
}
return _uidArray[docid];
}

Environment

None

Status

Assignee

John Wang

Reporter

oliver kang

Labels

None

Fix versions

Priority

Major
Configure