Skip to content

Apache Lucene open-source search software

SOLR-12387: added documentation

Noble Paulf27d8a2dbfee
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
</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