[ 
https://issues.apache.org/jira/browse/SOLR-8596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ismael Teijeiro Flórez updated SOLR-8596:
-----------------------------------------
    Description: 
When configuring the "Raw Query Parameters" field for a query with a value like 
the following, the generated query is incorrect:

{{stats=true&stats.field=\{!min=true 20max=true\}MYFIELD}}

The generated query in this case: 
{noformat}
http://localhost:8983/solr/mycollection/select?indent=on&q=*:*&rows=0&stats.field=\{!min&stats=true&wt=json
{noformat}
As you can see, the following fragment is incorrect: {{stats.field=\{!min}}.

This is the obtained response:
{noformat}
{
  "responseHeader":{
    "status":400,
    "QTime":0,
    "params":{
      "indent":"on",
      "stats.field":"{!min",
      "stats":"true",
      "q":"*:*",
      "_":"1453742574279",
      "wt":"json",
      "rows":"0"}},
  "error":{
    "msg":"Unable to parse stats.field: {!min due to: Expected identifier at 
pos 5 str='{!min'",
    "code":400}}
{noformat}
If the following URL is pasted directly in the browser, the query works as 
expected:
{noformat}
http://localhost:8983/solr/mycollection/select?indent=on&q=*:*&rows=0&stats.field={!min=true
 max=true}MYFIELD&stats=true&wt=json
{noformat}

  was:
When configuring the "Raw Query Parameters" field for a query with a value like 
the following, the generated query is incorrect:

{{stats=true&stats.field=\{!min=true 20max=true\}MYFIELD}}

The generated query in this case: 
{noformat}
http://localhost:8983/solr/selfinformation_from_lucene_collection/select?indent=on&q=*:*&rows=0&stats.field=\{!min&stats=true&wt=json
{noformat}
As you can see, the following fragment is incorrect: {{stats.field=\{!min}}.

This is the obtained response:
{noformat}
{
  "responseHeader":{
    "status":400,
    "QTime":0,
    "params":{
      "indent":"on",
      "stats.field":"{!min",
      "stats":"true",
      "q":"*:*",
      "_":"1453742574279",
      "wt":"json",
      "rows":"0"}},
  "error":{
    "msg":"Unable to parse stats.field: {!min due to: Expected identifier at 
pos 5 str='{!min'",
    "code":400}}
{noformat}
If the following URL is pasted directly in the browser, the query works as 
expected:
{noformat}
http://localhost:8983/solr/selfinformation_from_lucene_collection/select?indent=on&q=*:*&rows=0&stats.field={!min=true
 max=true}MYFIELD&stats=true&wt=json
{noformat}


> Web UI doesn't correctly generate queries which include local parameters
> ------------------------------------------------------------------------
>
>                 Key: SOLR-8596
>                 URL: https://issues.apache.org/jira/browse/SOLR-8596
>             Project: Solr
>          Issue Type: Bug
>          Components: web gui
>    Affects Versions: 5.4
>         Environment: Windows 8.1 Pro x64
>            Reporter: Ismael Teijeiro Flórez
>            Priority: Minor
>              Labels: local-parameters
>
> When configuring the "Raw Query Parameters" field for a query with a value 
> like the following, the generated query is incorrect:
> {{stats=true&stats.field=\{!min=true 20max=true\}MYFIELD}}
> The generated query in this case: 
> {noformat}
> http://localhost:8983/solr/mycollection/select?indent=on&q=*:*&rows=0&stats.field=\{!min&stats=true&wt=json
> {noformat}
> As you can see, the following fragment is incorrect: {{stats.field=\{!min}}.
> This is the obtained response:
> {noformat}
> {
>   "responseHeader":{
>     "status":400,
>     "QTime":0,
>     "params":{
>       "indent":"on",
>       "stats.field":"{!min",
>       "stats":"true",
>       "q":"*:*",
>       "_":"1453742574279",
>       "wt":"json",
>       "rows":"0"}},
>   "error":{
>     "msg":"Unable to parse stats.field: {!min due to: Expected identifier at 
> pos 5 str='{!min'",
>     "code":400}}
> {noformat}
> If the following URL is pasted directly in the browser, the query works as 
> expected:
> {noformat}
> http://localhost:8983/solr/mycollection/select?indent=on&q=*:*&rows=0&stats.field={!min=true
>  max=true}MYFIELD&stats=true&wt=json
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to