You talk about using CloudSolrServer and/or LBHttpSolrServer for access to Core Admin API. This a little strange because:
- A Core Admin API request should be sent to a specific Solr node in order for you to control where the shard is created (or removed from)
- CloudSolrServer and LBHttpSolrServer are all about sending requests that can end up going to a (randmon) node among several nodes
With the quick-fix code above (Tommaso Teofili 01/May/12) you will end up having your shard created on a random node among all live nodes - it is very rarely want you want.
So as long as we are talking about accessing Core Admin API you probably always want to use HttpSolrServer, which is aimed a sending the request to a specific node.
But when talking about creating an entire collection consisting of many shards, it is certainly meaningful to use CloudSolrServer. To create entire collections (without having to create each shard yourself using the Core Admin API) we now have the Collection API in 4.0.0. The Collection API can be used through CloudSolrServer, except...
- You cant create your first collection through CloudSolrServer
- You cant create a collection through a CloudSolrServer, where default-collection is the collection you want to create
...basically because CloudSolrServer wants an existing collection (pointed to by its default-collection or a collection-name provided in the actual request) before it can do anything.
This will be fixed with
SOLR-4140, but is not in 4.0.0.
Other things not in Collection API of 4.0.0
- You cant have more than one shard per collection on a single node - fixed in
- You cant specify which Solr nodes the shards for a new collection is allowed to be spread across - they are just spread across all live Solr nodes - fixed in
Please state if you still believe something is missing or unclear. Or else you might want to state that your "problems" are solved with the 4.0.0 Collection API (maybe plus one or more of
SOLR-4140, SOLR-4114 and SOLR-4120 which will hopefully be in "the next release") by closing this issue SOLR-3425