You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Koji Sekiguchi (JIRA)" <ji...@apache.org> on 2010/05/25 18:14:25 UTC

[jira] Created: (SOLR-1926) add hl.q parameter

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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (SOLR-1926) add hl.q parameter

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871234#action_12871234 ] 

Hoss Man commented on SOLR-1926:
--------------------------------

Koji: highlighting isn't something i think about much, but i have to wonder if an alternate "highlight _query_" is really the best concept here (specificly the part where it's parsed by a QParser into a Query and then the terms are extracted)

would it make more sense to imagine a multivalued "hl.text" param, such that each value is passed to the analyzer for each "hl.fl" field, and the resulting terms are all highlighted (in their respective fields) ... thus bypassing the complications of extracting temrs from queries?

would that be more useful or less useful?

(although: i suppose hl.requireFieldMatch wouldn't really make any sense in a situation like this ... and there'd be no way to say "highlight DELL only in the maker field")

Hmmm... anyway, just something i wanted to toss out there in case it inspired you.

> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org