Joey Hong created NUTCH-2309:
--------------------------------
Summary: Scoring-Similarity Plugin raises NullPointerException
when error occurs in fetching URL
Key: NUTCH-2309
URL: https://issues.apache.org/jira/browse/NUTCH-2309
Project: Nutch
Issue Type: Bug
Components: plugin, scoring
Affects Versions: 1.12
Reporter: Joey Hong
Priority: Trivial
Fix For: 1.13
When the Scoring-Similarity plugin is enabled, a NullPointerException is
thrown, cancelling the crawl, when computing the Cosine Similarity for URLs
where any kind of error occurred in fetching it.
The error occurs in line 77 in CosineSimilarity.java:
float score = Float.parseFloat(parseData.getContentMeta().get(Nutch.SCORE_KEY));
This is probably because Nutch.SCORE_KEY is null for such URLs. It can be
easily fixed by setting a default value for score.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)