Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a solr collection with curl

Tags:

solr

solrcloud

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.

like image 958
siva sandeep Avatar asked Dec 17 '25 10:12

siva sandeep


1 Answers

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

like image 189
Abhijit Bashetti Avatar answered Dec 20 '25 17:12

Abhijit Bashetti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!