Sorry :) no.

I run fetcher with parse.

This NPE  happens for only a few documents and that is the problem :)



On Mon, 2006-01-09 at 09:43 +0100, Andrzej Bialecki wrote:
> Gal Nitzan wrote:
> 
> >Hi Andrzej,
> >
> >The value cannot be null is my message :)
> >
> >  
> >
> 
> :)
> 
> I'm guessing that you are using Fetcher in non-parsing mode, and then 
> you run ParseSegment as a separate step, right?
> 
> Please try the attached patch.
> 
> plain text document attachment (patch)
> Index: ParseSegment.java
> ===================================================================
> --- ParseSegment.java (revision 367099)
> +++ ParseSegment.java (working copy)
> @@ -58,9 +58,16 @@
>        status = new ParseStatus(e);
>      }
>  
> +    ContentProperties metadata = parse.getData().getMetadata();
>      // compute the new signature
>      byte[] signature = 
> SignatureFactory.getSignature(getConf()).calculate(content, parse);
> -    parse.getData().getMetadata().setProperty(Fetcher.SIGNATURE_KEY, 
> StringUtil.toHexString(signature));
> +    metadata.setProperty(Fetcher.SIGNATURE_KEY, 
> StringUtil.toHexString(signature));
> +    // copy segment name and score
> +    String segmentName = 
> content.getMetadata().getProperty(Fetcher.SEGMENT_NAME_KEY);
> +    String score = content.getMetadata().getProperty(Fetcher.SCORE_KEY);
> +    metadata.setProperty(Fetcher.SEGMENT_NAME_KEY, segmentName);
> +    metadata.setProperty(Fetcher.SCORE_KEY, score);
> +    
>      if (status.isSuccess()) {
>        output.collect(key, new ParseImpl(parse.getText(), parse.getData()));
>      } else {




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Nutch-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-developers

Reply via email to