Searching on field A gives spurious highlights in field B

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

Searching on field A gives spurious highlights in field B

Jeffrey Baker
Hello all.  First post to the list.

I noticed that if I search for foo:blah&hl.fl=bar, I get highlight
output for instances of "blah" in field "bar".  Is there any way to
avoid that?  I'm using solr 1.3.


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

Re: Searching on field A gives spurious highlights in field B

Mike Klaas

On 6-Feb-09, at 12:34 PM, Jeffrey Baker wrote:

> Hello all.  First post to the list.

Welcome aboard.

> I noticed that if I search for foo:blah&hl.fl=bar, I get highlight
> output for instances of "blah" in field "bar".  Is there any way to
> avoid that?  I'm using solr 1.3.

Try hl.requireFieldMatch=true

http://wiki.apache.org/solr/HighlightingParameters

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

Re: Searching on field A gives spurious highlights in field B

Jeffrey Baker
On Fri, Feb 6, 2009 at 3:36 PM, Mike Klaas <[hidden email]> wrote:

>
> On 6-Feb-09, at 12:34 PM, Jeffrey Baker wrote:
>
>> Hello all.  First post to the list.
>
> Welcome aboard.
>
>> I noticed that if I search for foo:blah&hl.fl=bar, I get highlight
>> output for instances of "blah" in field "bar".  Is there any way to
>> avoid that?  I'm using solr 1.3.
>
> Try hl.requireFieldMatch=true

Thanks a lot.  I must have mentally skipped that one a dozen times.

-jwb