lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koji Sekiguchi (Updated) (JIRA)" <>
Subject [jira] [Updated] (SOLR-1926) add hl.q parameter
Date Sun, 06 Nov 2011 06:08:52 GMT


Koji Sekiguchi updated SOLR-1926:

    Attachment: SOLR-1926.patch

This patch supports both hl.q and hl.text. The priority is:

# Highlighter looks if there is hl.text and if it exists, uses it. FVH doesn't look it for
performance reasons.
# If hl.text doesn't exist, hl.q will be used.
# If hl.q doesn't exist, q will be used.

localParams can be used in hl.q, and hl.text parameter accepts per-field override.
> add hl.q parameter
> ------------------
>                 Key: SOLR-1926
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: highlighter
>    Affects Versions: 1.4
>            Reporter: Koji Sekiguchi
>            Priority: Trivial
>         Attachments: SOLR-1926.patch, SOLR-1926.patch
> 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:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message