You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2018/06/05 02:56:32 UTC

lucene-solr:branch_7x: SOLR-12387: added documentation

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 98bf43b3d -> 78617f992


SOLR-12387: added documentation


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/78617f99
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/78617f99
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/78617f99

Branch: refs/heads/branch_7x
Commit: 78617f992f03243c6b99a033b5609680418ddb83
Parents: 98bf43b
Author: Noble Paul <no...@apache.org>
Authored: Tue Jun 5 12:53:22 2018 +1000
Committer: Noble Paul <no...@apache.org>
Committed: Tue Jun 5 12:56:19 2018 +1000

----------------------------------------------------------------------
 solr/solr-ref-guide/src/collections-api.adoc | 42 +++++++++++++++++++++++
 1 file changed, 42 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/78617f99/solr/solr-ref-guide/src/collections-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/collections-api.adoc b/solr/solr-ref-guide/src/collections-api.adoc
index 1e895b2..53b6395 100644
--- a/solr/solr-ref-guide/src/collections-api.adoc
+++ b/solr/solr-ref-guide/src/collections-api.adoc
@@ -1085,6 +1085,48 @@ http://localhost:8983/solr/admin/collections?action=CLUSTERPROP&name=urlScheme&v
 </response>
 ----
 
+=== Deeply Nested Cluster Properties ===
+
+==== `collectionDefaults` ====
+It is possible to set cluster-wide default values for certain attributes of a collection.
+
+
+*Example 1: Set/update default values*
+[source]
+----
+curl -X POST -H 'Content-type:application/json' --data-binary '
+{ "set-obj-property" : {
+    "collectionDefaults" : {
+        "numShards" : 2,
+        "nrtReplicas" : 1,
+        "tlogReplicas" : 1,
+        "pullReplicas" : 1,
+
+   }
+}' http://localhost:8983/api/cluster
+----
+
+*Example 2: Unset the value of `nrtReplicas` alone*
+[source]
+----
+curl -X POST -H 'Content-type:application/json' --data-binary '
+{ "set-obj-property" : {
+    "collectionDefaults" : {
+        "nrtReplicas" : null,
+   }
+}' http://localhost:8983/api/cluster
+----
+
+*Example 2: Unset all values in `collectionDefaults`*
+[source]
+----
+curl -X POST -H 'Content-type:application/json' --data-binary '
+{ "set-obj-property" : {
+    "collectionDefaults" : null
+}' http://localhost:8983/api/cluster
+----
+
+
 [[collectionprop]]
 == COLLECTIONPROP: Collection Properties