epugh commented on code in PR #4203:
URL: https://github.com/apache/solr/pull/4203#discussion_r3448602026


##########
solr/core/src/java/org/apache/solr/handler/designer/SchemaDesigner.java:
##########
@@ -567,10 +599,8 @@ && 
zkStateReader().getClusterState().hasCollection(newCollection)) {
     // create new collection
     Map<Object, Throwable> errorsDuringIndexing = null;
     if (StrUtils.isNotNullOrEmpty(newCollection)) {
-      int numShards = req.getParams().getInt("numShards", 1);
-      int rf = req.getParams().getInt("replicationFactor", 1);
-      configSetHelper.createCollection(newCollection, configSet, numShards, 
rf);
-      if (req.getParams().getBool(INDEX_TO_COLLECTION_PARAM, false)) {
+      configSetHelper.createCollection(newCollection, configSet, numShards, 
replicationFactor);

Review Comment:
   I added a fix in #c788e9540648847a170c123f962274868af43fba thought I don't 
know if it's truly needed.   We have `@DefaultValue` annotations for anyone 
calling this via jax-rs.  Yes, if you call this directly as java code, then it 
isn't enforced, so this commit deals with that.  Having said that, I do like 
the variable names being cleaned up inside the method!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to