Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-11327: MODIFYCOLLECTION should be able to edit policy attribute

Noble Paula73ffff8e374
diff --git a/solr/solr-ref-guide/src/collections-api.adoc b/solr/solr-ref-guide/src/collections-api.adoc
index 09d79635042..1bb0201bb67 100644
--- a/solr/solr-ref-guide/src/collections-api.adoc
+++ b/solr/solr-ref-guide/src/collections-api.adoc
@@ -109,6 +109,8 @@ Replica placement rules. See the section <<rule-based-replica-placement.adoc#rul
`snitch`::
Details of the snitch provider. See the section <<rule-based-replica-placement.adoc#rule-based-replica-placement,Rule-based Replica Placement>> for details.
+`policy`:: Name of the collection-level policy. See <<solrcloud-autoscaling-policy-preferences.adoc#collection-specific-policy, Defining Collection-Specific Policies >> for details
+
=== CREATE Response
The response will include the status of the request and the new core names. If the status is anything other than "success", an error message will explain why the request failed.
@@ -173,6 +175,7 @@ The attributes that can be modified are:
* collection.configName
* rule
* snitch
+* policy
+
See the <<create,CREATE action>> section above for details on these attributes.
diff --git a/solr/solrj/src/resources/apispec/collections.Commands.json b/solr/solrj/src/resources/apispec/collections.Commands.json
index b7444f67536..2e3769b9dfb 100644
--- a/solr/solrj/src/resources/apispec/collections.Commands.json
+++ b/solr/solrj/src/resources/apispec/collections.Commands.json
@@ -101,6 +101,11 @@
"type": "string"
}
},
+ "policy": {
+ "type": "string",
+ "documentation": "https://lucene.apache.org/solr/guide/solrcloud-autoscaling-policy-preferences.html",
+ "description": "Name of the collection-level policy"
+ },
"properties": {
"type": "object",
"documentation": "https://lucene.apache.org/solr/guide/defining-core-properties.html",
diff --git a/solr/solrj/src/resources/apispec/collections.collection.Commands.modify.json b/solr/solrj/src/resources/apispec/collections.collection.Commands.modify.json
index f1115bce706..658b4ebe3dc 100644
--- a/solr/solrj/src/resources/apispec/collections.collection.Commands.modify.json
+++ b/solr/solrj/src/resources/apispec/collections.collection.Commands.modify.json
@@ -19,6 +19,11 @@
"type": "string"
}
},
+ "policy": {
+ "type": "string",
+ "documentation": "https://lucene.apache.org/solr/guide/solrcloud-autoscaling-policy-preferences.html",
+ "description": "Name of the collection-level policy"
+ },
"autoAddReplicas": {
"type": "boolean",
"description": "When set to true, enables auto addition of replicas on shared file systems (such as HDFS). See https://lucene.apache.org/solr/guide/running-solr-on-hdfs.html for more details on settings and overrides."