nutch2.3.1 SolrDeleteDuplicates.java 去重時空指標崩潰
阿新 • • 發佈:2019-02-01
修改原始碼如下:
@Override
public boolean nextKeyValue() throws IOException, InterruptedException {
while(true){
if (currentDoc >= numDocs) {
return false;
}
SolrDocument doc = solrDocs.get(currentDoc);
String digest = (String) doc.getFieldValue(SolrConstants.DIGEST_FIELD);
if (digest == null || digest.isEmpty()){
currentDoc++;
continue;
}
text.set(digest);
record.readSolrDocument(doc);
currentDoc++;
break;
}
return true;
}