non fix highlight snippet size

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

non fix highlight snippet size

Marc Sturlese
Hey there,
I need a rule in my highlights that sets for example, the snippet size to 400 in case there's just one snippet, 225 in case two snippeds are found and 125 in case 3 or more snippets are found. Is there any way to do that via solrconfig.xml (for what I have seen don't think so...) or should I code a plugin? In the second case do a I need an extended class of GapFragmenter or what I should hack is in another pice of the source?
Thanks in advanced
Reply | Threaded
Open this post in threaded view
|

Re: non fix highlight snippet size

Mike Klaas
On 13-Jan-09, at 12:48 AM, Marc Sturlese wrote:

>
> Hey there,
> I need a rule in my highlights that sets for example, the snippet  
> size to
> 400 in case there's just one snippet, 225 in case two snippeds are  
> found and
> 125 in case 3 or more snippets are found. Is there any way to do  
> that via
> solrconfig.xml (for what I have seen don't think so...) or should I  
> code a
> plugin? In the second case do a I need an extended class of  
> GapFragmenter or
> what I should hack is in another pice of the source?
> Thanks in advanced

There is no easy way to accomplish that, due to the architecture of  
the highlighter (which first generates fragments and only then  
determine whether they are snippets that contain the keyword(s))

-Mike