Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8596

Web UI doesn't correctly generate queries which include local parameters

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.4
    • Fix Version/s: 6.2, master (7.0)
    • Component/s: Admin UI
    • Environment:

      Windows 8.1 Pro x64

      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:

      http://localhost:8983/solr/mycollection/select?indent=on&q=*:*&rows=0&stats.field=\{!min&stats=true&wt=json
      

      As you can see, the following fragment is incorrect: stats.field={!min.

      This is the obtained response:

      {
        "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}}
      

      If the following URL is pasted directly in the browser, the query works as expected:

      http://localhost:8983/solr/mycollection/select?indent=on&q=*:*&rows=0&stats.field={!min=true max=true}MYFIELD&stats=true&wt=json
      

        Issue Links

          Activity

          Hide
          arafalov Alexandre Rafalovitch added a comment -

          I confirm this against the trunk with

               stats=true&stats.field={!min=true max=true}popularity
          
          Show
          arafalov Alexandre Rafalovitch added a comment - I confirm this against the trunk with stats= true &stats.field={!min= true max= true }popularity
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user arafalov opened a pull request:

          https://github.com/apache/lucene-solr/pull/56

          SOLR-8596: Split only on first equal sign

          Being more careful about splitting only on first equal sign, not all of them for raw requests. This avoids breaking local parameters syntax.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/arafalov/lucene-solr-contributions alex-SOLR-8596

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/lucene-solr/pull/56.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #56


          commit d80ce4a71fe5ac219355d4c096791a17f4173e00
          Author: Alexandre Rafalovitch <arafalov@gmail.com>
          Date: 2016-07-27T00:02:00Z

          SOLR-8596: Split only on first equal sign


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user arafalov opened a pull request: https://github.com/apache/lucene-solr/pull/56 SOLR-8596 : Split only on first equal sign Being more careful about splitting only on first equal sign, not all of them for raw requests. This avoids breaking local parameters syntax. You can merge this pull request into a Git repository by running: $ git pull https://github.com/arafalov/lucene-solr-contributions alex- SOLR-8596 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/lucene-solr/pull/56.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #56 commit d80ce4a71fe5ac219355d4c096791a17f4173e00 Author: Alexandre Rafalovitch <arafalov@gmail.com> Date: 2016-07-27T00:02:00Z SOLR-8596 : Split only on first equal sign
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user liuhongyi0101 commented on the issue:

          https://github.com/apache/lucene-solr/pull/56

          8 hours ago,good

          Show
          githubbot ASF GitHub Bot added a comment - Github user liuhongyi0101 commented on the issue: https://github.com/apache/lucene-solr/pull/56 8 hours ago,good
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit c9935b478839a602616c1c6b76e0d3bb06d8f789 in lucene-solr's branch refs/heads/master from Jan Høydahl
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c9935b4 ]

          SOLR-8596: Split UIs RAW query params only on first equal sign

          Show
          jira-bot ASF subversion and git services added a comment - Commit c9935b478839a602616c1c6b76e0d3bb06d8f789 in lucene-solr's branch refs/heads/master from Jan Høydahl [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=c9935b4 ] SOLR-8596 : Split UIs RAW query params only on first equal sign
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 3292acdb50fa77c693bc8c094b3ba4760a864b8f in lucene-solr's branch refs/heads/branch_6x from Jan Høydahl
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3292acd ]

          SOLR-8596: Split UIs RAW query params only on first equal sign
          (cherry picked from commit c9935b4)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 3292acdb50fa77c693bc8c094b3ba4760a864b8f in lucene-solr's branch refs/heads/branch_6x from Jan Høydahl [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=3292acd ] SOLR-8596 : Split UIs RAW query params only on first equal sign (cherry picked from commit c9935b4)
          Hide
          janhoy Jan Høydahl added a comment -

          Fixed.
          Alexandre Rafalovitch please close PR manually as I forgot to add the magic words to the commit msg

          Show
          janhoy Jan Høydahl added a comment - Fixed. Alexandre Rafalovitch please close PR manually as I forgot to add the magic words to the commit msg
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user arafalov commented on the issue:

          https://github.com/apache/lucene-solr/pull/56

          Fixed now.

          Show
          githubbot ASF GitHub Bot added a comment - Github user arafalov commented on the issue: https://github.com/apache/lucene-solr/pull/56 Fixed now.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user arafalov closed the pull request at:

          https://github.com/apache/lucene-solr/pull/56

          Show
          githubbot ASF GitHub Bot added a comment - Github user arafalov closed the pull request at: https://github.com/apache/lucene-solr/pull/56
          Hide
          mikemccand Michael McCandless added a comment -

          Bulk close resolved issues after 6.2.0 release.

          Show
          mikemccand Michael McCandless added a comment - Bulk close resolved issues after 6.2.0 release.

            People

            • Assignee:
              janhoy Jan Høydahl
              Reporter:
              iteijeiro Ismael Teijeiro Flórez
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development