Skip to content

Apache Lucene open-source search software

SOLR-12077: Add support for autoAddReplicas in the collection creation dialog in Admin UI

Shalin Shekhar Mangar2eeed51cdf00
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 4e96ca34f18..80d392c4fa4 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -198,6 +198,8 @@ New Features
* SOLR-11670: Implement a periodic house-keeping task. This uses a scheduled autoscaling trigger and
currently performs cleanup of old inactive shards. (ab, shalin)
+* SOLR-12077: Add support for autoAddReplicas in the collection creation dialog in Admin UI. (shalin)
+
Bug Fixes
----------------------
diff --git a/solr/webapp/web/js/angular/controllers/collections.js b/solr/webapp/web/js/angular/controllers/collections.js
index c67bc7efa3b..111d7ea5602 100644
--- a/solr/webapp/web/js/angular/controllers/collections.js
+++ b/solr/webapp/web/js/angular/controllers/collections.js
@@ -83,7 +83,8 @@ solrAdminApp.controller('CollectionsController',
numShards: 1,
configName: "",
replicationFactor: 1,
- maxShardsPerNode: 1
+ maxShardsPerNode: 1,
+ autoAddReplicas: 'false'
};
};
@@ -137,7 +138,8 @@ solrAdminApp.controller('CollectionsController',
numShards: coll.numShards,
"collection.configName": coll.configName,
replicationFactor: coll.replicationFactor,
- maxShardsPerNode: coll.maxShardsPerNode
+ maxShardsPerNode: coll.maxShardsPerNode,
+ autoAddReplicas: coll.autoAddReplicas
};
if (coll.shards) params.shards = coll.shards;
if (coll.routerField) params["router.field"] = coll.routerField;
diff --git a/solr/webapp/web/partials/collections.html b/solr/webapp/web/partials/collections.html
index 6f0c4219345..60ef47ad0a1 100644
--- a/solr/webapp/web/partials/collections.html
+++ b/solr/webapp/web/partials/collections.html
@@ -69,6 +69,13 @@ limitations under the License.
<p class="clearfix"><label for="add_routerField">router.field:</label>
<input type="text" name="routerField" id="add_routerField" ng-model="newCollection.routerField"></p>
+ <p class="clearfix"><label for="add_autoAddReplicas">autoAddReplicas:</label>
+ <select name="autoAddReplicas" id="add_autoAddReplicas" ng-model="newCollection.autoAddReplicas">
+ <option value="true">true</option>
+ <option value="false">false</option>
+ </select>
+ </p>
+
</div>
<p class="clearfix note error" ng-show="addMessage">
<span>{{addMessage}}</span>