You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Jim Lynch <jw...@sgi.com> on 2005/01/07 20:49:26 UTC

Quick question about highlighting.

I've read as much as I could find on the highlighting that is now in the 
sandbox.  I didn't find the javadocs.  I found a link to them, but it 
redirected my to a cvs tree.

Do I assume that you have to store the content of the document for the 
highlighting to work?  Otherwise I don't see how it could work.

Thanks,
Jim.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Quick question about highlighting.

Posted by Jim Lynch <jw...@sgi.com>.
OK, thanks.  That clears things up.  I'll play with it once I get 
something indexed.

Jim.

David Spencer wrote:

> Jim Lynch wrote:
>
>> I've read as much as I could find on the highlighting that is now in 
>> the sandbox.  I didn't find the javadocs.
>
>
> I have a copy here:
>
> http://www.searchmorph.com/pub/jakarta-lucene-sandbox/contributions/highlighter/build/docs/api/overview-summary.html 
>
>
>
>   I found a link to them, but it
>
>> redirected my to a cvs tree.
>>
>> Do I assume that you have to store the content of the document for 
>> the highlighting to work?  
>
>
> Not per se, but you do need access to the contents to pass to 
> Highlighter.getBestFragments(). You can store the contents in the 
> index, or you can have in a cache, DB, or you can refetch the doc...
>
> You need to know what Analyzer you used too to get the tokenStream via:
>
> TokenStream tokenStream = analyzer.tokenStream( field, new 
> StringReader(body));
>

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Quick question about highlighting.

Posted by David Spencer <da...@tropo.com>.
Jim Lynch wrote:

> I've read as much as I could find on the highlighting that is now in the 
> sandbox.  I didn't find the javadocs.

I have a copy here:

http://www.searchmorph.com/pub/jakarta-lucene-sandbox/contributions/highlighter/build/docs/api/overview-summary.html


   I found a link to them, but it
> redirected my to a cvs tree.
> 
> Do I assume that you have to store the content of the document for the 
> highlighting to work?  

Not per se, but you do need access to the contents to pass to 
Highlighter.getBestFragments(). You can store the contents in the index, 
or you can have in a cache, DB, or you can refetch the doc...

You need to know what Analyzer you used too to get the tokenStream via:

TokenStream tokenStream = analyzer.tokenStream( field, new 
StringReader(body));


> Otherwise I don't see how it could work.
> 
> Thanks,
> Jim.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org