Previously I was using nutch-0.7.2 and was able to use SegmentReader to 
read a specific segment
and then use the next method to read values from the open readers 
(FetcherOutput, Content, ParseText, and ParseData).

segmentReader = new SegmentReader(nfs, allSegmentFiles[i],
                        true, true, true, true);
while(segmentReader.next(fo, co, pt, pd)) {
...
}

 From using the fo (FetcherOutput), I could get the fetch date 
(fo.getFetchDate()).
 From using the pd (ParseData), I could get the title (fd.getTitle()).
 From using the pt (ParseText), I could get the parsed text (ft.getText()).

Now I trying to upgrade to nutch 0.8.x and I have downloaded nutch-0.8.1.
I am looking at the API and do not see how to read the data from the 
crawled segments.
SegmentReader has changed and no longer has next.  I see a get(Path 
segment, UTF8 key, Writer writer, Map results)
but don't have an code example.

I want to loop thru the records (or documents) in a segment and get the 
data (url, title, parsed text).

Can anyone, show me how to do this?

Nancy


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nutch-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-general

Reply via email to