I am unable to create a collection named 'testCollection' in the Solr Cloud.
URL: :8080/solr/admin/collections?action=CREATE&name=testCollection
Response: :
<str name="Operation create caused exception:">
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: No config set found to associate with the collection.
</str>
As per the documentation: (https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI) for create collction API, "collection.configName"
is not a mandatory field. If not provided, Solr will default to the collection name as the configuration name.
Why am I still facing this issue?
Is collection.configName mandatory?
How do I find out the associated collection.configName on zookeeper?
You must still upload the config set on to the zookeeper. You can find the list of config sets on the zookeeper in the admin UI under cloud->tree->configs. The collections are under cloud->tree->collections. If you click on a collection, you can find the config set that's associated with it: ({"configName":"MyConfig"})
You can upload the config set to the zookeeper using the zkcli.sh command on your solr host:
cd /opt/solr/server/scripts/cloud-scripts
./zkcli.sh -cmd upconfig -confdir /opt/solr/server/solr/MyCollection -confname MyConfig -z zoo1IP:2181,zoo2IP:2181,zoo3IP:2181