Apache Solr open-source search software
SOLR-13484: ref guide
Noble Paulda5e46fc5a59
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adocindex fa4135efbe0..acbfe163813 100644--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc@@ -142,6 +142,128 @@ However, since the first node in the first example had more than 1 replica for aIn the above example the node with port 8983 has two replicas for `shard1` in violation of our policy.+=== Inline Policy Configuration++If there is no autoscaling policy configured or if you wish to use a configuration other than the default, it is possible to send the autoscaling policy JSON as an inline payload as follows:++[source,bash]+----+ curl -X POST -H 'Content-type:application/json' -d '{+ "cluster-policy": [+ {"replica": 0, "port" : "7574"} ]+ }' http://localhost:8983/api/cluster/autoscaling/diagnostics?omitHeader=true+----++*Output*+[source,json]+----+{+ "diagnostics":{+ "sortedNodes":[{+ "node":"10.0.0.80:7574_solr",+ "isLive":true,+ "cores":2.0,+ "freedisk":567.4989128112793,+ "port":7574,+ "totaldisk":1044.122688293457,+ "replicas":{"mycoll":{+ "shard2":[{+ "core_node7":{+ "core":"mycoll_shard2_replica_n4",+ "shard":"shard2",+ "collection":"mycoll",+ "node_name":"10.0.0.80:7574_solr",+ "type":"NRT",+ "base_url":"http://10.0.0.80:7574/solr",+ "state":"active",+ "force_set_state":"false",+ "INDEX.sizeInGB":6.426125764846802E-8}}],+ "shard1":[{+ "core_node3":{+ "core":"mycoll_shard1_replica_n1",+ "shard":"shard1",+ "collection":"mycoll",+ "node_name":"10.0.0.80:7574_solr",+ "type":"NRT",+ "base_url":"http://10.0.0.80:7574/solr",+ "state":"active",+ "force_set_state":"false",+ "INDEX.sizeInGB":6.426125764846802E-8}}]}}}+ ,{+ "node":"10.0.0.80:8983_solr",+ "isLive":true,+ "cores":2.0,+ "freedisk":567.498908996582,+ "port":8983,+ "totaldisk":1044.122688293457,+ "replicas":{"mycoll":{+ "shard2":[{+ "core_node8":{+ "core":"mycoll_shard2_replica_n6",+ "shard":"shard2",+ "collection":"mycoll",+ "node_name":"10.0.0.80:8983_solr",+ "type":"NRT",+ "leader":"true",+ "base_url":"http://10.0.0.80:8983/solr",+ "state":"active",+ "force_set_state":"false",+ "INDEX.sizeInGB":6.426125764846802E-8}}],+ "shard1":[{+ "core_node5":{+ "core":"mycoll_shard1_replica_n2",+ "shard":"shard1",+ "collection":"mycoll",+ "node_name":"10.0.0.80:8983_solr",+ "type":"NRT",+ "leader":"true",+ "base_url":"http://10.0.0.80:8983/solr",+ "state":"active",+ "force_set_state":"false",+ "INDEX.sizeInGB":6.426125764846802E-8}}]}}}],+ "liveNodes":["10.0.0.80:7574_solr",+ "10.0.0.80:8983_solr"],+ "violations":[{+ "collection":"mycoll",+ "tagKey":7574,+ "violation":{+ "replica":{+ "NRT":2,+ "count":2},+ "delta":2.0},+ "clause":{+ "replica":0,+ "port":"7574",+ "collection":"mycoll"},+ "violatingReplicas":[{+ "core_node7":{+ "core":"mycoll_shard2_replica_n4",+ "shard":"shard2",+ "collection":"mycoll",+ "node_name":"10.0.0.80:7574_solr",+ "type":"NRT",+ "base_url":"http://10.0.0.80:7574/solr",+ "state":"active",+ "force_set_state":"false",+ "INDEX.sizeInGB":6.426125764846802E-8}}+ ,{+ "core_node3":{+ "core":"mycoll_shard1_replica_n1",+ "shard":"shard1",+ "collection":"mycoll",+ "node_name":"10.0.0.80:7574_solr",+ "type":"NRT",+ "base_url":"http://10.0.0.80:7574/solr",+ "state":"active",+ "force_set_state":"false",+ "INDEX.sizeInGB":6.426125764846802E-8}}]}],+ "config":{+ "cluster-policy":[{+ "replica":0,+ "port":"7574"}]}},+ "WARNING":"This response format is experimental. It is likely to change in the future."}+----+== Suggestions APISuggestions are operations recommended by the system according to the policies and preferences the user has set.