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 Lord Khan Han <kh...@gmail.com> on 2011/05/24 13:56:58 UTC

Solr Highlight Component

Hi ,

Can I limit the terms that the HighlightComponent uses. My query is
generally long and I want specific ones to be highlighted and the rest is
not highlighted. Is there an option like the SpellCheckComponent. it uses q
unless spellcheck.q if specified. Is  a hl.q parameter possible?


Or any other tricky way to workaround ..


PS: I need this tomorrow (hopefully) to show my boss insisting some other
stupid well known  commercial search engines..


Regards

Re: Solr Highlight Component

Posted by Mike Sokolov <so...@ifactory.com>.
A possible workaround is to re-fetch the documents in your result set 
with a query that is:

+id=(id1 or id2 or ... id20) (<highlight query>)

where id1..20 are the doc ids in your result set

would require two round-trips though

-Mike

On 05/24/2011 08:19 AM, Koji Sekiguchi wrote:
> (11/05/24 20:56), Lord Khan Han wrote:
>> Hi ,
>>
>> Can I limit the terms that the HighlightComponent uses. My query is
>> generally long and I want specific ones to be highlighted and the 
>> rest is
>> not highlighted. Is there an option like the SpellCheckComponent. it 
>> uses q
>> unless spellcheck.q if specified. Is  a hl.q parameter possible?
>
> No, but hl.q was proposed by me a year ago:
>
> https://issues.apache.org/jira/browse/SOLR-1926
>
> I'm sorry but no progress is there at this moment.
>
> koji

Re: Solr Highlight Component

Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(11/05/24 20:56), Lord Khan Han wrote:
> Hi ,
>
> Can I limit the terms that the HighlightComponent uses. My query is
> generally long and I want specific ones to be highlighted and the rest is
> not highlighted. Is there an option like the SpellCheckComponent. it uses q
> unless spellcheck.q if specified. Is  a hl.q parameter possible?

No, but hl.q was proposed by me a year ago:

https://issues.apache.org/jira/browse/SOLR-1926

I'm sorry but no progress is there at this moment.

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