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 Jae Joo <ja...@gmail.com> on 2014/07/18 23:15:20 UTC
Range query and Highlighting
If I use a combined query - range query and others (term query), all terms
in field matched is highlighted. Any way to highlight only the term(s) in
term query?
Here is example.
+date:{20031231 TO *] +(title:red)
It highlight all terms except stopword.
using fq would not be an option because there may be multiple term queries
and boolean queries combined.
Any idea?
Jae
Re: Range query and Highlighting
Posted by Jack Krupansky <ja...@basetechnology.com>.
You can specify an "alternate" query to use for highlighting purposes, with
the "hl.q" parameter. It doesn't affect the query results, but lets you
control which terms get highlighted.
See:
http://wiki.apache.org/solr/HighlightingParameters#hl.q
-- Jack Krupansky
-----Original Message-----
From: Jae Joo
Sent: Friday, July 18, 2014 5:15 PM
To: solr-user@lucene.apache.org
Subject: Range query and Highlighting
If I use a combined query - range query and others (term query), all terms
in field matched is highlighted. Any way to highlight only the term(s) in
term query?
Here is example.
+date:{20031231 TO *] +(title:red)
It highlight all terms except stopword.
using fq would not be an option because there may be multiple term queries
and boolean queries combined.
Any idea?
Jae