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 homerlex <ho...@gmail.com> on 2010/06/03 15:21:05 UTC
Highlighting Issue
We have Highlighting enabled. We specify that we only want highlighting on
the "body" property.
When doing a query like this: (body:tester OR project_id:704) the text
highlighted in the body includes any text that is "tester" and any text that
is "704".
Is there a way to prevent the highlighting from marking up values that are
in the query that have nothing to do with actually matching on the body?
Thanks in advance.
--
View this message in context: http://lucene.472066.n3.nabble.com/Highlighting-Issue-tp867567p867567.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Highlighting Issue
Posted by Erick Erickson <er...@gmail.com>.
Have you looked at DisMaxRequestHandler?
Best
Erick
On Thu, Jun 3, 2010 at 11:23 AM, homerlex <ho...@gmail.com> wrote:
>
>
> iorixxx wrote:
> >
> > hl.requireFieldMatch=true
> >
> > http://wiki.apache.org/solr/HighlightingParameters#hl.requireFieldMatch
> >
> >
>
> I had tried this before but it did not work because in the query I did not
> specify body:. This does work fine if I put body:terms in the query.
>
> Is there an simpler syntax to say search for terms in the following
> properties X,Y, and Z only or do I have to do this:
> x:terms OR y:terms OR z.terms
>
> Thanks for the help.
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Highlighting-Issue-tp867567p867876.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Re: Highlighting Issue
Posted by homerlex <ho...@gmail.com>.
iorixxx wrote:
>
> hl.requireFieldMatch=true
>
> http://wiki.apache.org/solr/HighlightingParameters#hl.requireFieldMatch
>
>
I had tried this before but it did not work because in the query I did not
specify body:. This does work fine if I put body:terms in the query.
Is there an simpler syntax to say search for terms in the following
properties X,Y, and Z only or do I have to do this:
x:terms OR y:terms OR z.terms
Thanks for the help.
--
View this message in context: http://lucene.472066.n3.nabble.com/Highlighting-Issue-tp867567p867876.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Highlighting Issue
Posted by Ahmet Arslan <io...@yahoo.com>.
> We have Highlighting enabled. We specify that we only
> want highlighting on
> the "body" property.
>
> When doing a query like this: (body:tester OR
> project_id:704) the text
> highlighted in the body includes any text that is "tester"
> and any text that
> is "704".
>
> Is there a way to prevent the highlighting from marking up
> values that are
> in the query that have nothing to do with actually matching
> on the body?
hl.requireFieldMatch=true
http://wiki.apache.org/solr/HighlightingParameters#hl.requireFieldMatch