You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Sebastian Nagel (JIRA)" <ji...@apache.org> on 2018/06/28 09:48:00 UTC

[jira] [Updated] (NUTCH-2309) Scoring-Similarity Plugin raises NullPointerException when error occurs in fetching URL

     [ https://issues.apache.org/jira/browse/NUTCH-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastian Nagel updated NUTCH-2309:
-----------------------------------
    Fix Version/s:     (was: 1.15)
                   1.16

> 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
>              Labels: easyfix
>             Fix For: 1.16
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> 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
(v7.6.3#76005)