[jira] [Created] (SOLR-12849) collection parameter being handled differently when sent as GET than when sent as POST

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (SOLR-12849) collection parameter being handled differently when sent as GET than when sent as POST

JIRA jira@apache.org
Shawn Heisey created SOLR-12849:
-----------------------------------

             Summary: collection parameter being handled differently when sent as GET than when sent as POST
                 Key: SOLR-12849
                 URL: https://issues.apache.org/jira/browse/SOLR-12849
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: SolrCloud
    Affects Versions: 7.5
            Reporter: Shawn Heisey


This is a weird one.

Fired up a cloud example, server built from branch_7x code (7.6.0-SNAPSHOT)
Created four collections with the _default configset -- foo, foo2, bar, bar2.
Created four aliases, here's the contents of aliases.json:
{noformat}
    {"collection":{
        "b_s":"bar",
        "b_m":"bar2,bar",
        "f_s":"foo",
        "f_m":"foo2,foo"}}
{noformat}

This curl command will fail, with "Could not find collection : b_s" as the message:
{noformat}
curl -XPOST -s localhost:8983/solr/b_s/select -d 'q=*:*&rows=0&collection=b_s'
{noformat}

That seems like a bug, but it's not the whole story.  Here's where things get weird.  The following two commands will NOT fail:
{noformat}
curl -XPOST -s localhost:8983/solr/b_m/select -d 'q=*:*&rows=0&collection=b_m'
curl -XGET -s "localhost:8983/solr/b_s/select?q=*:*&rows=0&collection=b_s"
{noformat}

The first one is very similar to the one that fails, except it uses an alias pointing at multiple collections instead of an alias pointing at one collection.  The second is effectively identical to the command that fails, except it's a GET rather than a POST -- the parameters are part of the URL rather than being specified in the request body.




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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