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 Jeffrey Baker <jw...@gmail.com> on 2009/02/06 21:34:07 UTC

Searching on field A gives spurious highlights in field B

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

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

Posted by Jeffrey Baker <jw...@gmail.com>.
On Fri, Feb 6, 2009 at 3:36 PM, Mike Klaas <mi...@gmail.com> 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

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

Posted by Mike Klaas <mi...@gmail.com>.
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