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

collection parameter referencing an alias being handled differently when sent as GET than when sent as POST

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 7.5
    • None
    • SolrCloud
    • None

    Description

      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:

          {"collection":{
              "b_s":"bar",
              "b_m":"bar2,bar",
              "f_s":"foo",
              "f_m":"foo2,foo"}}
      

      This curl command will fail, with "Could not find collection : b_s" as the message:

      curl -XPOST -s localhost:8983/solr/b_s/select -d 'q=*:*&rows=0&collection=b_s'
      

      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:

      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"
      

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            elyograg Shawn Heisey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: