gerlowskija commented on a change in pull request #575: SOLR-13235: Split 
Collections API Ref Guide page
URL: https://github.com/apache/lucene-solr/pull/575#discussion_r257733502
 
 

 ##########
 File path: solr/solr-ref-guide/src/collection-management.adoc
 ##########
 @@ -0,0 +1,752 @@
+= Collection Management Commands
+:page-tocclass: right
+:page-toclevels: 1
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+A collection is a single logical index that uses a single Solr configuration 
file (`solrconfig.xml`) and a single index schema.
+
+[[create]]
+== CREATE: Create a Collection
+
+`/admin/collections?action=CREATE&name=_name_`
+
+=== CREATE Parameters
+
+The CREATE action allows the following parameters:
+
+`name`::
+The name of the collection to be created. This parameter is required.
+
+`router.name`::
+The router name that will be used. The router defines how documents will be 
distributed among the shards. Possible values are `implicit` or `compositeId`, 
which is the default.
++
+The `implicit` router does not automatically route documents to different 
shards. Whichever shard you indicate on the indexing request (or within each 
document) will be used as the destination for those documents.
++
+The `compositeId` router hashes the value in the uniqueKey field and looks up 
that hash in the collection's clusterstate to determine which shard will 
receive the document, with the additional ability to manually direct the 
routing.
++
+When using the `implicit` router, the `shards` parameter is required. When 
using the `compositeId` router, the `numShards` parameter is required.
++
+For more information, see also the section 
<<shards-and-indexing-data-in-solrcloud.adoc#document-routing,Document 
Routing>>.
+
+`numShards`::
+The number of shards to be created as part of the collection. This is a 
required parameter when the `router.name` is `compositeId`.
+
+`shards`::
+A comma separated list of shard names, e.g., `shard-x,shard-y,shard-z`. This 
is a required parameter when the `router.name` is `implicit`.
+
+`replicationFactor`::
+The number of replicas to be created for each shard. The default is `1`.
++
+This will create a NRT type of replica. If you want another type of replica, 
see the `tlogReplicas` and `pullReplica` parameters below. See the section 
<<shards-and-indexing-data-in-solrcloud.adoc#types-of-replicas,Types of 
Replicas>> for more information about replica types.
+
+`nrtReplicas`::
+The number of NRT (Near-Real-Time) replicas to create for this collection. 
This type of replica maintains a transaction log and updates its index locally. 
If you want all of your replicas to be of this type, you can simply use 
`replicationFactor` instead.
+
+`tlogReplicas`::
+The number of TLOG replicas to create for this collection. This type of 
replica maintains a transaction log but only updates its index via replication 
from a leader. See the section 
<<shards-and-indexing-data-in-solrcloud.adoc#types-of-replicas,Types of 
Replicas>> for more information about replica types.
+
+`pullReplicas`::
+The number of PULL replicas to create for this collection. This type of 
replica does not maintain a transaction log and only updates its index via 
replication from a leader. This type is not eligible to become a leader and 
should not be the only type of replicas in the collection. See the section 
<<shards-and-indexing-data-in-solrcloud.adoc#types-of-replicas,Types of 
Replicas>> for more information about replica types.
+
+`maxShardsPerNode`::
+When creating collections, the shards and/or replicas are spread across all 
available (i.e., live) nodes, and two replicas of the same shard will never be 
on the same node.
++
+If a node is not live when the CREATE action is called, it will not get any 
parts of the new collection, which could lead to too many replicas being 
created on a single live node. Defining `maxShardsPerNode` sets a limit on the 
number of replicas the CREATE action will spread to each node.
++
+If the entire collection can not be fit into the live nodes, no collection 
will be created at all. The default `maxShardsPerNode` value is `1`.
+
+`createNodeSet`::
+Allows defining the nodes to spread the new collection across. The format is a 
comma-separated list of node_names, such as 
`localhost:8983_solr,localhost:8984_solr,localhost:8985_solr`.
++
+If not provided, the CREATE operation will create shard-replicas spread across 
all live Solr nodes.
++
+Alternatively, use the special value of `EMPTY` to initially create no 
shard-replica within the new collection and then later use the 
<<replica-management.adoc#addreplica,ADDREPLICA>> operation to add 
shard-replicas when and where required.
+
+`createNodeSet.shuffle`::
+Controls wether or not the shard-replicas created for this collection will be 
assigned to the nodes specified by the `createNodeSet` in a sequential manner, 
or if the list of nodes should be shuffled prior to creating individual 
replicas.
 
 Review comment:
   [0] typo: wether/whether

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to