You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2013/04/15 08:39:00 UTC

[Solr Wiki] Update of "SolrCloud" by TimVaillancourt

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SolrCloud" page has been changed by TimVaillancourt:
http://wiki.apache.org/solr/SolrCloud?action=diff&rev1=95&rev2=96

Comment:
Adding createalias plus params for delete/reload.

  == Managing collections via the Collections API ==
  The collections API let's you manage collections. Under the hood, it generally uses the CoreAdmin API to asynchronously (though Overseer) manage SolrCores on each server - it's essentially sugar for actions that you could handle yourself if you made individual CoreAdmin API calls to each server you wanted an action to take place on.
  
- Create http://localhost:8983/solr/admin/collections?action=CREATE&name=mycollection&numShards=3&replicationFactor=4
+ '''Create''' http://localhost:8983/solr/admin/collections?action=CREATE&name=mycollection&numShards=3&replicationFactor=4
  
- About the params
+ About the params:
- 
-  * '''name''': The name of the collection to be created
+  * '''name''': The name of the collection to be created.
-  * '''numShards''': The number of logical shards (sometimes called slices) to be created as part of the collection
+  * '''numShards''': The number of logical shards (sometimes called slices) to be created as part of the collection.
   * '''replicationFactor''': The number of copies of each document (or, the number of physical replicas to be created for each logical shard of the collection.)  A replicationFactor of 3 means that there will be 3 replicas (one of which is normally designated to be the leader) for each logical shard.  NOTE: in Solr 4.0, replicationFactor was the number of *additional* copies as opposed to the total number of copies.
   * '''maxShardsPerNode''' : A create operation will spread numShards*replicationFactor shard-replica across your live Solr nodes - fairly distributed, and never two replica of the same shard on the same Solr node. If a Solr is not live at the point in time where the create operation is carried out, it will not get any parts of the new collection. To prevent too many replica being created on a single Solr node, use maxShardsPerNode to set a limit for how many replicas the create operation is allowed to create on each node - default is 1. If it cannot fit the entire collection numShards*replicationFactor replicas on you live Solrs it will not create anything at all.
   * '''createNodeSet''': If not provided the create operation will create shard-replica spread across all of your live Solr nodes. You can provide the "createNodeSet" parameter to change the set of nodes to spread the shard-replica across. The format of values for this param is "<node-name1>,<node-name2>,...,<node-nameN>" - e.g. "localhost:8983_solr,localhost:8984_solr,localhost:8985_solr"
   * '''collection.configName''': The name of the config (must be already stored in zookeeper) to use for this new collection.
  
- Delete http://localhost:8983/solr/admin/collections?action=DELETE&name=mycollection
+ '''Delete''' http://localhost:8983/solr/admin/collections?action=DELETE&name=mycollection
  
+ About the params:
+  * '''name''': The name of the collection to be deleted.
+ 
- Reload http://localhost:8983/solr/admin/collections?action=RELOAD&name=mycollection
+ '''Reload''' http://localhost:8983/solr/admin/collections?action=RELOAD&name=mycollection
+ 
+ About the params:
+  * '''name''': The name of the collection to be reloaded.
+ 
+ '''CreateAlias''' (''added in Solr 4.2'') http://localhost:8983/solr/admin/collections?action=CREATEALIAS&name=alias&collections=collection1,collection2,…
+ 
+ About the params:
+  * '''name''': The name of the collection alias to be created
+  * '''collections''': A comma-separated list of one or more collections to alias to.
  
  == Creating cores via CoreAdmin ==
  New Solr cores may also be created and associated with a collection via CoreAdmin.