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 Ahson Iqbal <mi...@yahoo.com> on 2010/09/17 09:36:17 UTC

Solr Highlighting Issue

Hi All

I have an issue in highlighting that if i query solr on more than one fields 
like "+Contents:risk +Form:1" and even i specify the highlighting field is 
"Contents" it still highlights risk as well as 1, because it is specified in the 
query.. now if i split the query as "+Contents:risk" is given as main query and 
"+Form:1" as filter query and specify "Contents" as highlighting field, it works 
fine, can any body tell me the reason. 


Regards
Ahsan



      

Re: Solr Highlighting Issue

Posted by Ahson Iqbal <mi...@yahoo.com>.
Hi Koji

thank you very much it really works




________________________________
From: Koji Sekiguchi <ko...@r.email.ne.jp>
To: solr-user@lucene.apache.org
Sent: Fri, September 17, 2010 7:11:31 PM
Subject: Re: Solr Highlighting Issue

  (10/09/17 16:36), Ahson Iqbal wrote:
> Hi All
>
> I have an issue in highlighting that if i query solr on more than one fields
> like "+Contents:risk +Form:1" and even i specify the highlighting field is
> "Contents" it still highlights risk as well as 1, because it is specified in 
>the
> query.. now if i split the query as "+Contents:risk" is given as main query 
and
> "+Form:1" as filter query and specify "Contents" as highlighting field, it 
>works
> fine, can any body tell me the reason.
>
>
> Regards
> Ahsan
>
Hi Ahsan,

Use hl.requireFieldMatch=true
http://wiki.apache.org/solr/HighlightingParameters#hl.requireFieldMatch

Koji

-- 
http://www.rondhuit.com/en/


      

Re: Solr Highlighting Issue

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
  (10/09/17 16:36), Ahson Iqbal wrote:
> Hi All
>
> I have an issue in highlighting that if i query solr on more than one fields
> like "+Contents:risk +Form:1" and even i specify the highlighting field is
> "Contents" it still highlights risk as well as 1, because it is specified in the
> query.. now if i split the query as "+Contents:risk" is given as main query and
> "+Form:1" as filter query and specify "Contents" as highlighting field, it works
> fine, can any body tell me the reason.
>
>
> Regards
> Ahsan
>
Hi Ahsan,

Use hl.requireFieldMatch=true
http://wiki.apache.org/solr/HighlightingParameters#hl.requireFieldMatch

Koji

-- 
http://www.rondhuit.com/en/


Re: Solr Highlighting Issue

Posted by Lance Norskog <go...@gmail.com>.
The same as with other formats. You give it strings to drop in before
and after the highlighted text.

On Fri, Sep 17, 2010 at 9:48 AM, Dennis Gearon <ge...@sbcglobal.net> wrote:
> How does highlighting work with JSON output?
>
> Dennis Gearon
>
> Signature Warning
> ----------------
> EARTH has a Right To Life,
>  otherwise we all die.
>
> Read 'Hot, Flat, and Crowded'
> Laugh at http://www.yert.com/film.php
>
>
> --- On Fri, 9/17/10, Ahson Iqbal <mi...@yahoo.com> wrote:
>
>> From: Ahson Iqbal <mi...@yahoo.com>
>> Subject: Solr Highlighting Issue
>> To: solr-user@lucene.apache.org
>> Date: Friday, September 17, 2010, 12:36 AM
>> Hi All
>>
>> I have an issue in highlighting that if i query solr on
>> more than one fields
>> like "+Contents:risk +Form:1" and even i specify the
>> highlighting field is
>> "Contents" it still highlights risk as well as 1, because
>> it is specified in the
>> query.. now if i split the query as "+Contents:risk" is
>> given as main query and
>> "+Form:1" as filter query and specify "Contents" as
>> highlighting field, it works
>> fine, can any body tell me the reason.
>>
>>
>> Regards
>> Ahsan
>>
>>
>>
>>
>



-- 
Lance Norskog
goksron@gmail.com

Re: Solr Highlighting Issue

Posted by Dennis Gearon <ge...@sbcglobal.net>.
How does highlighting work with JSON output?

Dennis Gearon

Signature Warning
----------------
EARTH has a Right To Life,
  otherwise we all die.

Read 'Hot, Flat, and Crowded'
Laugh at http://www.yert.com/film.php


--- On Fri, 9/17/10, Ahson Iqbal <mi...@yahoo.com> wrote:

> From: Ahson Iqbal <mi...@yahoo.com>
> Subject: Solr Highlighting Issue
> To: solr-user@lucene.apache.org
> Date: Friday, September 17, 2010, 12:36 AM
> Hi All
> 
> I have an issue in highlighting that if i query solr on
> more than one fields 
> like "+Contents:risk +Form:1" and even i specify the
> highlighting field is 
> "Contents" it still highlights risk as well as 1, because
> it is specified in the 
> query.. now if i split the query as "+Contents:risk" is
> given as main query and 
> "+Form:1" as filter query and specify "Contents" as
> highlighting field, it works 
> fine, can any body tell me the reason. 
> 
> 
> Regards
> Ahsan
> 
> 
> 
>