Newbie question about highlighting

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

Newbie question about highlighting

David Halsted
Please forgive if this question is already answered on the Wiki or in
the mailing list archives -- I had a look and didn't quite see it but
may have missed something.

Question is pretty simple; I'm just not sure how to merge highlighted
snippets back into a stored field.  For example, I have a stored field
containing a paragraph of three lines or so. I want display the
paragraph as a whole, with the found terms highlighted.   What I get
back from a Solr query is the paragraph in <str> tags in the main
results, and then a set of  snippets with highlights representing only
part of the original paragraph.  Do I have to search and find the
spots to reinsert the snippets so I get the highlighting in the
context of the original paragraph, or is there some easier way?

Thanks in advance,
Dave Halsted
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question about highlighting

Yonik Seeley-2
On 11/26/06, David Halsted <[hidden email]> wrote:
> Do I have to search and find the
> spots to reinsert the snippets so I get the highlighting in the
> context of the original paragraph, or is there some easier way?

Hi David,
I think hl.fragsize=0 might do what you want.
From http://wiki.apache.org/solr/HighlightingParameters:

"""
hl.fragsize

The size, in characters, of fragments to consider for highlighting.
"0" indicates that the whole field value should be used (no
fragmenting). This parameter accepts per-field overrides.

The default value is "100".
"""

-Yonik
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question about highlighting

David Halsted
Perfect -- I saw that but misunderstood it.  Thanks, Yonik.

Dave

On 11/26/06, Yonik Seeley <[hidden email]> wrote:

> On 11/26/06, David Halsted <[hidden email]> wrote:
> > Do I have to search and find the
> > spots to reinsert the snippets so I get the highlighting in the
> > context of the original paragraph, or is there some easier way?
>
> Hi David,
> I think hl.fragsize=0 might do what you want.
> From http://wiki.apache.org/solr/HighlightingParameters:
>
> """
> hl.fragsize
>
> The size, in characters, of fragments to consider for highlighting.
> "0" indicates that the whole field value should be used (no
> fragmenting). This parameter accepts per-field overrides.
>
> The default value is "100".
> """
>
> -Yonik
>