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 Pavel Drobushevich <p....@gmail.com> on 2011/10/10 17:08:15 UTC

Filter Query highlight

Hi all,

I use solr filter query, for example: <str name="fq">type:cat</str> and
enable highlight for all fields <str name="hl">on</str>, but highlighter
return empty result.

How can I enable highlight for filter query?

**
*Thanks in advance,*
*Pavel Drobushevich*
*mailto:* p.drobushevich@gmail.com*
**skype*: pavel_drabushevich
*profile:* http://www.google.com/profiles/p.drobushevich

Re: Filter Query highlight

Posted by Jan Høydahl <ja...@cominvent.com>.
Hi,

The highlighter will only highlight words from your main query. So to get highlighting for your example, add a query in "q" with the words you need highlighted:

.../solr/select?fq=type:cat&q=type:cat&hl=on&hl.fl=type

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 10. okt. 2011, at 17:08, Pavel Drobushevich wrote:

> Hi all,
> 
> I use solr filter query, for example: <str name="fq">type:cat</str> and
> enable highlight for all fields <str name="hl">on</str>, but highlighter
> return empty result.
> 
> How can I enable highlight for filter query?
> 
> **
> *Thanks in advance,*
> *Pavel Drobushevich*
> *mailto:* p.drobushevich@gmail.com*
> **skype*: pavel_drabushevich
> *profile:* http://www.google.com/profiles/p.drobushevich