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

Yonik Seeley commented on SOLR-11501:
-------------------------------------

Hmm, actually there are two different issues here that I conflated a bit:
1) if the actual syntax of a parser should support localParams (and this does 
seem useful to be able to turn off if desired)
2) if one can override defType via localParams and get a different qparser 
(defType was only meant to be the default)

So this issue is more about making certain defTypes non-switchable (it's not 
just the default, we will force the parser and disallow it to be overridden by 
local params).

So if someone sets up a request handler with defType=dismax or edismax, but 
also depends on being able to switch to different parsers like 
{code}
q={!lucene}...
q={!join}...
q={!xml}...
{code}
This would break that behavior.  The question is... how many people do this (or 
interface with systems that do this)?


> Depending on the parser, QParser should not parse local-params
> --------------------------------------------------------------
>
>                 Key: SOLR-11501
>                 URL: https://issues.apache.org/jira/browse/SOLR-11501
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: query parsers
>            Reporter: David Smiley
>            Assignee: David Smiley
>         Attachments: SOLR_11501_limit_local_params_parsing.patch
>
>
> Solr should not parse local-params (and thus be able to switch the query 
> parser) in certain circumstances.  _Perhaps_ it is when the QParser.getParser 
> is passed "lucene" for the {{defaultParser}}?  This particular approach is 
> just a straw-man; I suspect certain valid embedded queries could no longer 
> work if this is done incorrectly.  Whatever the solution, I don't think we 
> should assume 'q' is special, as it's valid and useful to build up queries 
> containing user input in other ways, e.g. {{q= +field:value +\{!dismax 
> v=$qq\}&qq=user input}}      and we want to protect the user input there 
> similarly from unwelcome query parsing switching.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to