You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by "Harmesh, V2solutions" <ha...@in.v2solutions.com> on 2007/08/23 08:05:19 UTC

Re: Lucene client and nutch index

Hi , 
   Please can u tell me the way of creating summary using Lucene. I am able
to fetch the url and title from doc but i need Sumamry which i was not able
to find.
I am using Nutch-0.9 for cralling , but for searching, i am prefering to use
lucene . Please help me if possible
Thanks in advance



Naess, Ronny wrote:
> 
> I have made a small Lucene client reading my nutch index created with
> Nutch-0.9
> 
> This works fine. However since 'content' is not stored only indexed in
> the index I have to find a way to access the content to create a summary
> (and highlighting the query terms).
> 
> I think I have found that the 'content' is cached and I have to retrive
> the text from the segmentdb. Is there a way to retrive this content text
> form the segment and still have the ability to use Lucene as client?
> 
> I have debugged the Nutch code while doing a query and I found out that
> class FetchedSegments has the following method
> 
> public Summary getSummary(HitDetails details, Query query) throws
> IOException {
> 
>     if (this.summarizer == null) { return new Summary(); }
>       String text =
> getSegment(details).getParseText(getUrl(details)).getText();
> 
>     return this.summarizer.getSummary(text, query);
> }
> 
> Where  getSegment(details).getParseText(getUrl(details)).getText();
> seems to do the trick by returning the actual content but this also do
> not seem like an easy way for me to do it from a Lucene perspective. 
> 
> Is this the only way to access the content, or is there other ways
> aswell?
> 
> Also, I have a java 1.4 restriction so using the Nutch webclient is not
> an option.
> 
> 
> Best regards,
> Ronny
> 
> 

-- 
View this message in context: http://www.nabble.com/Lucene-client-and-nutch-index-tf3947821.html#a12288055
Sent from the Nutch - User mailing list archive at Nabble.com.