Skip to content

Commit

Permalink
kebab the replicationFactor
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Mar 4, 2024
1 parent d79832e commit d289da2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions solr/core/src/java/org/apache/solr/cli/CreateTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public List<Option> getOptions() {
.desc("Number of shards; default is 1.")
.build(),
Option.builder("rf")
.longOpt("replicationFactor")
.longOpt("replication-factor")
.argName("#")
.hasArg()
.required(false)
Expand Down Expand Up @@ -242,7 +242,7 @@ protected void createCollection(CloudSolrClient cloudSolrClient, CommandLine cli
// build a URL to create the collection
int numShards = Integer.parseInt(cli.getOptionValue("shards", String.valueOf(1)));
int replicationFactor =
Integer.parseInt(cli.getOptionValue("replicationFactor", String.valueOf(1)));
Integer.parseInt(cli.getOptionValue("replication-factor", String.valueOf(1)));

boolean configExistsInZk =
confName != null
Expand Down
4 changes: 2 additions & 2 deletions solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ protected void runExample(CommandLine cli, String exampleName) throws Exception
new String[] {
"-name", collectionName,
"-shards", "1",
"-replicationFactor", "1",
"--replication-factor", "1",
"-confname", collectionName,
"-confdir", configSet,
"-configsetsDir", configsetsDir.getAbsolutePath(),
Expand Down Expand Up @@ -853,7 +853,7 @@ protected String createCloudExampleCollection(
new String[] {
"-name", collectionName,
"-shards", String.valueOf(numShards),
"-replicationFactor", String.valueOf(replicationFactor),
"--replication-factor", String.valueOf(replicationFactor),
"-confname", collectionName,
"-confdir", cloudConfig,
"-configsetsDir", configsetsDir.getAbsolutePath(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void testLoadDocsIntoGettingStartedCollection() throws Exception {
testCollectionName,
"-shards",
"2",
"-replicationFactor",
"--replication-factor",
"2",
"-confname",
testCollectionName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ Only applies when Solr is running in SolrCloud mode.
+
*Example*: `bin/solr create -s 2`

`-rf <replicas>` or `--replicationFactor <replicas>`::
`-rf <replicas>` or `--replication-factor <replicas>`::
+
[%autowidth,frame=none]
|===
Expand Down

0 comments on commit d289da2

Please sign in to comment.