[
https://issues.apache.org/jira/browse/SOLR-1926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128129#comment-13128129
]
Ukyo Virgden edited comment on SOLR-1926 at 10/15/11 10:31 AM:
---------------------------------------------------------------
Hoss: Having a look at the highlight component I see that the Lucene
highlighters require a FieldQuery. Although hl.text params makes much more
sense, it seams to keep a Query object in response builder would be easier.
From what I see in the code, I think set/getHighlightQuery() should not be in
QParser. Anyway, setting highlight query of response builder during query
preperation might do the trick.
was (Author: ukyo):
Hoss: Having a look at the highlight component I see that the Lucene
highlighters require a FieldQuery. Although hl.text params makes much more
sense, it seams to keep a Query object in response builder makes sense. From
what I see in the code, I think set/getHighlightQuery() should not be in
QParser. Anyway, setting highlight query of response builder during query
preperation might do the trick.
> add hl.q parameter
> ------------------
>
> Key: SOLR-1926
> URL: https://issues.apache.org/jira/browse/SOLR-1926
> Project: Solr
> Issue Type: Improvement
> Components: highlighter
> Affects Versions: 1.4
> Reporter: Koji Sekiguchi
> Priority: Trivial
>
> If hl.q parameter is set, HighlightComponent uses it rather than q.
> Use case:
> You search "PC" with highlight and facet capability:
> {code}
> q=PC
> &facet=on&facet.field=maker&facet.field=something
> &hl=on&hl.fl=desc
> {code}
> You get a lot of results with snippets (term "PC" highlighted in desc field).
> Then you click a link "maker:DELL(50)" to narrow the result:
> {code}
> q=PC
> &facet=on&facet.field=something
> &fq=maker:DELL
> &hl=on&hl.fl=desc
> {code}
> You'll get narrowed result with term "PC" highlighted snippets. But,
> sometimes I'd like to see "DELL" to be highlighted as well, because I clicked
> "DELL". In this case, hl.q can be used:
> {code}
> q=PC
> &facet=on&facet.field=something
> &fq=maker:DELL
> &hl=on&hl.fl=desc&*hl.q=PC+maker:DELL*
> {code}
> Note that hl.requireFieldMatch should be false (false is default) in this
> scenario.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]