[GitHub] gerlowskija commented on a change in pull request #575: SOLR-13235: Split Collections API Ref Guide page

2019-02-18 Thread GitBox
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_`
+
+=== 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 
<>.
+
+`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 
<> 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 
<> 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 
<> 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 

[GitHub] gerlowskija commented on a change in pull request #575: SOLR-13235: Split Collections API Ref Guide page

2019-02-18 Thread GitBox
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_r257728062
 
 

 ##
 File path: solr/solr-ref-guide/src/cluster-node-management.adoc
 ##
 @@ -0,0 +1,496 @@
+= Cluster and Node 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 cluster is a set of Solr nodes operating in coordination with each other.
+
+These API commands work with a SolrCloud cluster at the entire cluster level, 
or on individual nodes.
+
+[[clusterstatus]]
+== CLUSTERSTATUS: Cluster Status
+
+Fetch the cluster status including collections, shards, replicas, 
configuration name as well as collection aliases and cluster properties.
+
+`/admin/collections?action=CLUSTERSTATUS`
+
+=== CLUSTERSTATUS Parameters
+
+`collection`::
+The collection name for which information is requested. If omitted, 
information on all collections in the cluster will be returned.
+
+`shard`::
+The shard(s) for which information is requested. Multiple shard names can be 
specified as a comma-separated list.
+
+`\_route_`::
+This can be used if you need the details of the shard where a particular 
document belongs to and you don't know which shard it falls under.
+
+=== CLUSTERSTATUS Response
+
+The response will include the status of the request and the status of the 
cluster.
+
+=== Examples using CLUSTERSTATUS
+
+*Input*
+
+[source,text]
+
+http://localhost:8983/solr/admin/collections?action=CLUSTERSTATUS
+
+
+*Output*
+
+[source,json]
+
+{
+  "responseHeader":{
+"status":0,
+"QTime":333},
+  "cluster":{
+"collections":{
+  "collection1":{
+"shards":{
+  "shard1":{
+"range":"8000-",
+"state":"active",
+"replicas":{
+  "core_node1":{
+"state":"active",
+"core":"collection1",
+"node_name":"127.0.1.1:8983_solr",
+"base_url":"http://127.0.1.1:8983/solr;,
+"leader":"true"},
+  "core_node3":{
+"state":"active",
+"core":"collection1",
+"node_name":"127.0.1.1:8900_solr",
+"base_url":"http://127.0.1.1:8900/solr"}}},
+  "shard2":{
+"range":"0-7fff",
+"state":"active",
+"replicas":{
+  "core_node2":{
+"state":"active",
+"core":"collection1",
+"node_name":"127.0.1.1:7574_solr",
+"base_url":"http://127.0.1.1:7574/solr;,
+"leader":"true"},
+  "core_node4":{
+"state":"active",
+"core":"collection1",
+"node_name":"127.0.1.1:7500_solr",
+"base_url":"http://127.0.1.1:7500/solr",
+"maxShardsPerNode":"1",
+"router":{"name":"compositeId"},
+"replicationFactor":"1",
+"znodeVersion": 11,
+"autoCreated":"true",
+"configName" : "my_config",
+"aliases":["both_collections"]
+  },
+  "collection2":{
+"..."
+  }
+},
+"aliases":{ "both_collections":"collection1,collection2" },
+"roles":{
+  "overseer":[
+"127.0.1.1:8983_solr",
+"127.0.1.1:7574_solr"]
+},
+"live_nodes":[
+  "127.0.1.1:7574_solr",
+  "127.0.1.1:7500_solr",
+  "127.0.1.1:8983_solr",
+  "127.0.1.1:8900_solr"]
+  }
+}
+
+
+
+[[clusterprop]]
+== CLUSTERPROP: Cluster Properties
+
+Add, edit or delete a cluster-wide property.
+
+`/admin/collections?action=CLUSTERPROP=_propertyName_=_propertyValue_`
+
+=== CLUSTERPROP Parameters
+
+`name`::
+The name of the property. Supported properties names are `urlScheme` and 
`autoAddReplicas and location`. Other names are rejected with an error.
 
 Review comment:
   [0] Missing opening/closing backticks after `autoAddReplicas` and `location`.


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