You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by khirb7 <kh...@gmail.com> on 2008/04/10 16:03:04 UTC

Re: Snipets Solr/nutch(maxFragSize?)



khirb7 wrote:
> 
> hello every body
>  
> just one other question, to analyse and modify Solr's snippet, I want to
> know if  org.apache.solr.util.HighlightingUtils
> is the class generating the snippet and which methode generate them, and
> could you please explain me how are they generated in that class and where
> exactly to modify it. all that in order to not return the first word
> encountered highlighted but to return an other one because of the problem
> I explained  in my previous messages
> 
> Cheers
> 
I have done deep search and I found that lucene provide this that methode  :
getBestFragments
highlighter.getBestFragments(tokenStream, text, maxNumFragment, "...");

so with this methode we can precise to lucene to return   maxNumFragment
fragment (with highligted word)of fragsize characters, but there is no
maxFragSize parameter in solr. this would be useful in my case if I want to
highlight not only the first occurrence of a searched word but up to 1
occurrence of the same word. 

cheers




-- 
View this message in context: http://www.nabble.com/Snipets-Solr-nutch-tp16537216p16608806.html
Sent from the Solr - User mailing list archive at Nabble.com.