You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2013/02/12 02:45:12 UTC

[jira] [Commented] (SOLR-4410) Highlight query parameter (hl.q) does not honor QParser defType parameter

    [ https://issues.apache.org/jira/browse/SOLR-4410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13576284#comment-13576284 ] 

Hoss Man commented on SOLR-4410:
--------------------------------

-1

defType is explicitly only for defining the "default" value of the "type" local param when parsing the "q" param.  I don't think using it implicitly in hl.q makes any more sense then using it implicitly in fq, or facet.query, or any other context -- particularly since one of the driving motivators for having the hl.q param is to let users specify simpler alternate variants of the main query bypassing the query parser used.

Changing this now could have some really unfortunate (and silent) side effects for anyone already hl.q who expect the existing behavior.

                
> Highlight query parameter (hl.q) does not honor QParser defType parameter
> -------------------------------------------------------------------------
>
>                 Key: SOLR-4410
>                 URL: https://issues.apache.org/jira/browse/SOLR-4410
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>    Affects Versions: 4.1
>            Reporter: Scott Smerchek
>            Priority: Minor
>              Labels: highlighter, qparserplugin
>         Attachments: SOLR-4410.patch
>
>
> If one uses a custom QParser for parsing standard queries, that person cannot do the same with the highlight query parameter using the 'defType' parameter.
> The hl.q QParser will always default to the default defType unless the local params syntax is used to specify a different QParser.
> The typical expectation would be that q and hl.q would behave the same.
> The following examples should highlight the document in the same way:
> {code}
> q=field:text&hl=true&defType=custom
> {code}
> {code}
> q=id:123&hl=true&hl.q=field:text&defType=custom
> {code}
> This is how you have to do it now:
> {code}
> q=field:text&hl=true&defType=custom
> {code}
> {code}
> q=id:123&hl=true&hl.q={!custom}field:text&defType=custom
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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