From f27d8a2dbfee4ba75b7bada786328a4077865d5b Mon Sep 17 00:00:00 2001 From: Noble Paul Date: Tue, 5 Jun 2018 12:53:22 +1000 Subject: [PATCH] SOLR-12387: added documentation --- solr/solr-ref-guide/src/collections-api.adoc | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/solr/solr-ref-guide/src/collections-api.adoc b/solr/solr-ref-guide/src/collections-api.adoc index 1e895b287fb..53b6395d3fe 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 ---- +=== 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