Search code examples
solrsolrcloud

Creating a solr collection with curl


I am trying to create collection in solr cloud,

https://abc.a/solr/admin/collections?action=CREATE&name=123&configSet=super&numShards=2&replicationFactor=2&maxShardsPerNode=2&wt=json

The collection is created, but the configSet is created using _default besides the specified configSet "super"

super configuration already uploaded to zookeeper.


Solution

  • You can use below url to create the collection

    http://localhost:8983/solr/admin/collections?action=CREATE&name=TestDemo4&numShards=1&replicationFactor=1&createNodeSet=localhost:8983_solr&collection.configName=pkiConfig
    

    The response you get is :

    {
      "responseHeader":
       {
        "status":0,
        "QTime":697 
       }
    }
    

    In the solr admin page you check the collection and verify which configset is been used for the collection.

    Screenshot