From 51bffcd42a2bed974ce77cd3cb15a3365957bab6 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Mon, 18 May 2026 09:27:03 -0400 Subject: [PATCH 1/7] Spike of supporting longer option description for ref guide and short for cli --- .../org/apache/solr/cli/ConfigSetOptions.java | 11 +++++++- .../src/java/org/apache/solr/cli/SolrCLI.java | 25 +++++++++++++++++++ .../pages/cli/solr-zk-downconfig.adoc | 14 +++++++++++ .../pages/cli/solr-zk-upconfig.adoc | 14 +++++++++++ 4 files changed, 63 insertions(+), 1 deletion(-) diff --git a/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java b/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java index 61eb657ff776..eded5af52718 100644 --- a/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java +++ b/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java @@ -28,7 +28,16 @@ public class ConfigSetOptions { @CommandLine.Option( names = {"-n", "--conf-name"}, - description = "Configset name in ZooKeeper.", + description = { + "Configset name in ZooKeeper.", + "Name of the configuration set in ZooKeeper. This command will upload the configuration set to the \"configs\" ZooKeeper node giving it the name specified.", + "", + "You can see all uploaded configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them.", + "", + "If a pre-existing configuration set is specified, it will be overwritten in ZooKeeper.", + "", + "**Example:** `-n myconfig`" + }, required = true) public String confName; diff --git a/solr/core/src/java/org/apache/solr/cli/SolrCLI.java b/solr/core/src/java/org/apache/solr/cli/SolrCLI.java index f6ccd7d33333..d8b8152298ae 100755 --- a/solr/core/src/java/org/apache/solr/cli/SolrCLI.java +++ b/solr/core/src/java/org/apache/solr/cli/SolrCLI.java @@ -109,8 +109,33 @@ public static void main(String[] args) throws Exception { } } + /** + * Truncates each option's description to its first line for interactive {@code --help} output. + * The remaining lines of the {@code description} array are reserved for the generated ref-guide. + * ManPageGenerator bypasses this customization (it always calls {@code + * createDefaultOptionRenderer()} on a fresh Help), so the .adoc still shows the full description. + */ + private static void installFirstLineOnlyHelpFactory(picocli.CommandLine cmd) { + cmd.setHelpFactory( + (spec, colorScheme) -> + new picocli.CommandLine.Help(spec, colorScheme) { + @Override + public picocli.CommandLine.Help.IOptionRenderer createDefaultOptionRenderer() { + picocli.CommandLine.Help.IOptionRenderer base = super.createDefaultOptionRenderer(); + return (option, paramLabelRenderer, scheme) -> { + picocli.CommandLine.Help.Ansi.Text[][] rows = + base.render(option, paramLabelRenderer, scheme); + return rows.length <= 1 + ? rows + : new picocli.CommandLine.Help.Ansi.Text[][] {rows[0]}; + }; + } + }); + } + /** Propagates common settings to all subcommands. */ private static void propagateCommandSettings(picocli.CommandLine cmd) { + installFirstLineOnlyHelpFactory(cmd); for (picocli.CommandLine subcommand : cmd.getSubcommands().values()) { subcommand.getCommandSpec().defaultValueProvider(cmd.getCommandSpec().defaultValueProvider()); subcommand.getCommandSpec().usageMessage().width(cmd.getCommandSpec().usageMessage().width()); diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc index 65c2b5de424d..7ce476465804 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc @@ -54,6 +54,20 @@ Download a configset from ZooKeeper to the local filesystem. *-n*, *--conf-name*=__:: Configset name in ZooKeeper. ++ +Name of the configuration set in ZooKeeper. This command will upload the configuration set to the "configs" ZooKeeper node giving it the name specified. ++ + ++ +You can see all uploaded configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them. ++ + ++ +If a pre-existing configuration set is specified, it will be overwritten in ZooKeeper. ++ + ++ +**Example:** `-n myconfig` *-s*, *--solr-url*=__:: Base Solr URL, which can be used to determine the zk-host if --zk-host is not known diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc index 0b796355c9a0..c8e3b00059f4 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc @@ -54,6 +54,20 @@ Upload a configset from the local filesystem to ZooKeeper. *-n*, *--conf-name*=__:: Configset name in ZooKeeper. ++ +Name of the configuration set in ZooKeeper. This command will upload the configuration set to the "configs" ZooKeeper node giving it the name specified. ++ + ++ +You can see all uploaded configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them. ++ + ++ +If a pre-existing configuration set is specified, it will be overwritten in ZooKeeper. ++ + ++ +**Example:** `-n myconfig` *-s*, *--solr-url*=__:: Base Solr URL, which can be used to determine the zk-host if --zk-host is not known From 0b279401eb7941eab7ada1bf9b72ecc617406f80 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Mon, 18 May 2026 09:42:20 -0400 Subject: [PATCH 2/7] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- solr/core/src/java/org/apache/solr/cli/SolrCLI.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/cli/SolrCLI.java b/solr/core/src/java/org/apache/solr/cli/SolrCLI.java index d8b8152298ae..87d19b5d96f6 100755 --- a/solr/core/src/java/org/apache/solr/cli/SolrCLI.java +++ b/solr/core/src/java/org/apache/solr/cli/SolrCLI.java @@ -112,8 +112,8 @@ public static void main(String[] args) throws Exception { /** * Truncates each option's description to its first line for interactive {@code --help} output. * The remaining lines of the {@code description} array are reserved for the generated ref-guide. - * ManPageGenerator bypasses this customization (it always calls {@code - * createDefaultOptionRenderer()} on a fresh Help), so the .adoc still shows the full description. + * This customization is only installed on the interactive CLI command setup, so ref-guide + * generation, which runs the doc generator directly, still sees the full description. */ private static void installFirstLineOnlyHelpFactory(picocli.CommandLine cmd) { cmd.setHelpFactory( From 9fc50d90daf708440c2970003cc1a9bdfa99e868 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Mon, 18 May 2026 09:48:30 -0400 Subject: [PATCH 3/7] option text that works for upconfig and downconfig --- solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java | 4 ++-- .../deployment-guide/pages/cli/solr-zk-downconfig.adoc | 4 ++-- .../modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java b/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java index eded5af52718..32ce1202356b 100644 --- a/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java +++ b/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java @@ -30,9 +30,9 @@ public class ConfigSetOptions { names = {"-n", "--conf-name"}, description = { "Configset name in ZooKeeper.", - "Name of the configuration set in ZooKeeper. This command will upload the configuration set to the \"configs\" ZooKeeper node giving it the name specified.", + "Name of the configuration set under the \"/configs\" ZooKeeper node.", "", - "You can see all uploaded configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them.", + "You can see available configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them.", "", "If a pre-existing configuration set is specified, it will be overwritten in ZooKeeper.", "", diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc index 7ce476465804..8b1b3e152484 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc @@ -55,11 +55,11 @@ Download a configset from ZooKeeper to the local filesystem. *-n*, *--conf-name*=__:: Configset name in ZooKeeper. + -Name of the configuration set in ZooKeeper. This command will upload the configuration set to the "configs" ZooKeeper node giving it the name specified. +Name of the configuration set under the "/configs" ZooKeeper node. + + -You can see all uploaded configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them. +You can see available configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them. + + diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc index c8e3b00059f4..b401dd745404 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc @@ -55,11 +55,11 @@ Upload a configset from the local filesystem to ZooKeeper. *-n*, *--conf-name*=__:: Configset name in ZooKeeper. + -Name of the configuration set in ZooKeeper. This command will upload the configuration set to the "configs" ZooKeeper node giving it the name specified. +Name of the configuration set under the "/configs" ZooKeeper node. + + -You can see all uploaded configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them. +You can see available configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them. + + From b044396ad624bc7aa90d86ee5ac8219953b2a055 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Mon, 18 May 2026 10:00:37 -0400 Subject: [PATCH 4/7] Lets be adult and actually add a test --- .../src/java/org/apache/solr/cli/SolrCLI.java | 3 ++- .../test/org/apache/solr/cli/SolrCLITest.java | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/solr/core/src/java/org/apache/solr/cli/SolrCLI.java b/solr/core/src/java/org/apache/solr/cli/SolrCLI.java index 87d19b5d96f6..71ae5ec8f48b 100755 --- a/solr/core/src/java/org/apache/solr/cli/SolrCLI.java +++ b/solr/core/src/java/org/apache/solr/cli/SolrCLI.java @@ -115,7 +115,8 @@ public static void main(String[] args) throws Exception { * This customization is only installed on the interactive CLI command setup, so ref-guide * generation, which runs the doc generator directly, still sees the full description. */ - private static void installFirstLineOnlyHelpFactory(picocli.CommandLine cmd) { + @VisibleForTesting + static void installFirstLineOnlyHelpFactory(picocli.CommandLine cmd) { cmd.setHelpFactory( (spec, colorScheme) -> new picocli.CommandLine.Help(spec, colorScheme) { diff --git a/solr/core/src/test/org/apache/solr/cli/SolrCLITest.java b/solr/core/src/test/org/apache/solr/cli/SolrCLITest.java index d045ae35501e..50cfcfed3cd0 100644 --- a/solr/core/src/test/org/apache/solr/cli/SolrCLITest.java +++ b/solr/core/src/test/org/apache/solr/cli/SolrCLITest.java @@ -36,4 +36,27 @@ public void testUptime() { assertEquals( "106751991167 days, 7 hours, 12 minutes, 56 seconds", SolrCLI.uptime(Long.MAX_VALUE)); } + + @Test + public void testFirstLineOnlyHelpFactoryTruncatesMultiLineDescription() { + picocli.CommandLine cmd = new picocli.CommandLine(new MultiLineDescriptionCommand()); + + String baseline = cmd.getUsageMessage(); + assertTrue("baseline should include first line", baseline.contains("First line.")); + assertTrue("baseline should include second line", baseline.contains("Second line.")); + + SolrCLI.installFirstLineOnlyHelpFactory(cmd); + String truncated = cmd.getUsageMessage(); + assertTrue("truncated should include first line", truncated.contains("First line.")); + assertFalse("truncated should NOT include second line", truncated.contains("Second line.")); + assertFalse("truncated should NOT include third line", truncated.contains("Third line.")); + } + + @picocli.CommandLine.Command(name = "test") + private static class MultiLineDescriptionCommand { + @picocli.CommandLine.Option( + names = "--multi", + description = {"First line.", "Second line.", "Third line."}) + String multi; + } } From 341f7b776a60148715aaf25bdbb332512a25eb12 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Tue, 19 May 2026 19:37:26 -0400 Subject: [PATCH 5/7] The --conf-dir docs are quite different based on up and down Can't reuse the same one ;-( --- .../solr/cli/ConfigSetDownloadTool.java | 18 ++++++++++++++- .../org/apache/solr/cli/ConfigSetOptions.java | 7 ------ .../apache/solr/cli/ConfigSetUploadTool.java | 18 ++++++++++++++- .../pages/cli/solr-zk-downconfig.adoc | 22 ++++++++++++++----- .../pages/cli/solr-zk-upconfig.adoc | 18 +++++++++++++-- 5 files changed, 66 insertions(+), 17 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/cli/ConfigSetDownloadTool.java b/solr/core/src/java/org/apache/solr/cli/ConfigSetDownloadTool.java index 5f414e4c2fc4..8c6ede7b83a0 100644 --- a/solr/core/src/java/org/apache/solr/cli/ConfigSetDownloadTool.java +++ b/solr/core/src/java/org/apache/solr/cli/ConfigSetDownloadTool.java @@ -66,6 +66,22 @@ public class ConfigSetDownloadTool extends ToolBase { @picocli.CommandLine.Mixin ConfigSetOptions configSetOpts; + @picocli.CommandLine.Option( + names = {"-d", "--conf-dir"}, + description = { + "Local directory for configs.", + "The path to write the downloaded configuration set into. If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be the parent. An absolute path may be supplied as well.", + "", + "In either case, _pre-existing configurations at the destination will be overwritten_!", + "", + "**Examples:**", + "* `-d directory_under_configsets`", + "* `-d /path/to/configset/destination`" + }, + required = true, + paramLabel = "DIR") + public String confDir; + public ConfigSetDownloadTool() { this(new DefaultToolRuntime()); } @@ -138,7 +154,7 @@ public int callTool() throws Exception { .withUrl(zkHost) .withTimeout(SolrZkClientTimeout.DEFAULT_ZK_CLIENT_TIMEOUT, TimeUnit.MILLISECONDS) .build()) { - doDownconfig(zkClient, zkHost, configSetOpts.confName, configSetOpts.confDir); + doDownconfig(zkClient, zkHost, configSetOpts.confName, confDir); return 0; } catch (Exception e) { log.error("Could not complete downconfig operation for reason: ", e); diff --git a/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java b/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java index 32ce1202356b..82226b5c388e 100644 --- a/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java +++ b/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java @@ -40,11 +40,4 @@ public class ConfigSetOptions { }, required = true) public String confName; - - @CommandLine.Option( - names = {"-d", "--conf-dir"}, - description = "Local directory with configs.", - required = true, - paramLabel = "DIR") - public String confDir; } diff --git a/solr/core/src/java/org/apache/solr/cli/ConfigSetUploadTool.java b/solr/core/src/java/org/apache/solr/cli/ConfigSetUploadTool.java index b1c534bda45a..2e98ecf1eb1f 100644 --- a/solr/core/src/java/org/apache/solr/cli/ConfigSetUploadTool.java +++ b/solr/core/src/java/org/apache/solr/cli/ConfigSetUploadTool.java @@ -68,6 +68,22 @@ public class ConfigSetUploadTool extends ToolBase { @picocli.CommandLine.Mixin ConfigSetOptions configSetOpts; + @picocli.CommandLine.Option( + names = {"-d", "--conf-dir"}, + description = { + "Local directory for configs.", + "The local directory of the configuration set to upload. It should have a `conf` directory immediately below it that in turn contains `solrconfig.xml` etc.", + "", + "If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be checked for this name. An absolute path may be supplied instead.", + "", + "**Examples:**", + "* `-d directory_under_configsets`", + "* `-d /path/to/configset/source`" + }, + required = true, + paramLabel = "DIR") + public String confDir; + public ConfigSetUploadTool() { this(new DefaultToolRuntime()); } @@ -142,7 +158,7 @@ public int callTool() throws Exception { .withUrl(zkHost) .withTimeout(SolrZkClientTimeout.DEFAULT_ZK_CLIENT_TIMEOUT, TimeUnit.MILLISECONDS) .build()) { - doUpconfig(zkClient, zkHost, configSetOpts.confName, configSetOpts.confDir); + doUpconfig(zkClient, zkHost, configSetOpts.confName, confDir); return 0; } catch (Exception e) { log.error("Could not complete upconfig operation for reason: ", e); diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc index 535f3a37d3d9..dd6994fbb49f 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc @@ -50,11 +50,24 @@ Download a configset from ZooKeeper to the local filesystem. == Options *-d*, *--conf-dir*=_DIR_:: - *(required)* Local directory with configs. + *(required)* Local directory for configs. ++ +The path to write the downloaded configuration set into. If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be the parent. An absolute path may be supplied as well. ++ + ++ +In either case, _pre-existing configurations at the destination will be overwritten_! ++ + ++ +**Examples:** ++ +* `-d directory_under_configsets` ++ +* `-d /path/to/configset/destination` *-n*, *--conf-name*=__:: -<<<<<<< SOLR-17697-allow-description-with-long-markdown - Configset name in ZooKeeper. + *(required)* Configset name in ZooKeeper. + Name of the configuration set under the "/configs" ZooKeeper node. + @@ -69,9 +82,6 @@ If a pre-existing configuration set is specified, it will be overwritten in ZooK + **Example:** `-n myconfig` -======= - *(required)* Configset name in ZooKeeper. ->>>>>>> jira/SOLR-17697-picocli *-s*, *--solr-url*=__:: Base Solr URL, which can be used to determine the zk-host if --zk-host is not known diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc index d77f7bf49975..dd7588a98ef3 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc @@ -50,10 +50,24 @@ Upload a configset from the local filesystem to ZooKeeper. == Options *-d*, *--conf-dir*=_DIR_:: - *(required)* Local directory with configs. + *(required)* Local directory for configs. ++ +The local directory of the configuration set to upload. It should have a `conf` directory immediately below it that in turn contains `solrconfig.xml` etc. ++ + ++ +If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be checked for this name. An absolute path may be supplied instead. ++ + ++ +**Examples:** ++ +* `-d directory_under_configsets` ++ +* `-d /path/to/configset/source` *-n*, *--conf-name*=__:: - Configset name in ZooKeeper. + *(required)* Configset name in ZooKeeper. + Name of the configuration set under the "/configs" ZooKeeper node. + From 3b1d5d1d587aa401d9c43da693e4047f067eb4f6 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Tue, 19 May 2026 19:56:19 -0400 Subject: [PATCH 6/7] text block works! Still have markdown. --- .../org/apache/solr/cli/ConfigSetOptions.java | 21 ++++++++++--------- .../pages/cli/solr-zk-downconfig.adoc | 2 ++ .../pages/cli/solr-zk-upconfig.adoc | 2 ++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java b/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java index 82226b5c388e..c5b2b1a77ad0 100644 --- a/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java +++ b/solr/core/src/java/org/apache/solr/cli/ConfigSetOptions.java @@ -28,16 +28,17 @@ public class ConfigSetOptions { @CommandLine.Option( names = {"-n", "--conf-name"}, - description = { - "Configset name in ZooKeeper.", - "Name of the configuration set under the \"/configs\" ZooKeeper node.", - "", - "You can see available configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them.", - "", - "If a pre-existing configuration set is specified, it will be overwritten in ZooKeeper.", - "", - "**Example:** `-n myconfig`" - }, + description = + """ + Configset name in ZooKeeper. + Name of the configuration set under the "/configs" ZooKeeper node. + + You can see available configuration sets in the Admin UI via the Cloud screens. Choose Cloud → Tree → configs to see them. + + If a pre-existing configuration set is specified, it will be overwritten in ZooKeeper. + + **Example:** `-n myconfig` + """, required = true) public String confName; } diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc index dd6994fbb49f..b6412348e4ff 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc @@ -82,6 +82,8 @@ If a pre-existing configuration set is specified, it will be overwritten in ZooK + **Example:** `-n myconfig` ++ + *-s*, *--solr-url*=__:: Base Solr URL, which can be used to determine the zk-host if --zk-host is not known diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc index dd7588a98ef3..8f7f3140443f 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc @@ -82,6 +82,8 @@ If a pre-existing configuration set is specified, it will be overwritten in ZooK + **Example:** `-n myconfig` ++ + *-s*, *--solr-url*=__:: Base Solr URL, which can be used to determine the zk-host if --zk-host is not known From bf0c3d5b14b0a41fed34a7c30e592843443917ba Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Tue, 19 May 2026 20:05:47 -0400 Subject: [PATCH 7/7] Finish conversion to using text-block --- .../solr/cli/ConfigSetDownloadTool.java | 21 ++++++++++--------- .../apache/solr/cli/ConfigSetUploadTool.java | 21 ++++++++++--------- .../pages/cli/solr-zk-downconfig.adoc | 2 ++ .../pages/cli/solr-zk-upconfig.adoc | 2 ++ 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/cli/ConfigSetDownloadTool.java b/solr/core/src/java/org/apache/solr/cli/ConfigSetDownloadTool.java index 8c6ede7b83a0..33d7727f6e2f 100644 --- a/solr/core/src/java/org/apache/solr/cli/ConfigSetDownloadTool.java +++ b/solr/core/src/java/org/apache/solr/cli/ConfigSetDownloadTool.java @@ -68,16 +68,17 @@ public class ConfigSetDownloadTool extends ToolBase { @picocli.CommandLine.Option( names = {"-d", "--conf-dir"}, - description = { - "Local directory for configs.", - "The path to write the downloaded configuration set into. If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be the parent. An absolute path may be supplied as well.", - "", - "In either case, _pre-existing configurations at the destination will be overwritten_!", - "", - "**Examples:**", - "* `-d directory_under_configsets`", - "* `-d /path/to/configset/destination`" - }, + description = + """ + Local directory for configs. + The path to write the downloaded configuration set into. If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be the parent. An absolute path may be supplied as well. + + In either case, _pre-existing configurations at the destination will be overwritten_! + + **Examples:** + * `-d directory_under_configsets` + * `-d /path/to/configset/destination` + """, required = true, paramLabel = "DIR") public String confDir; diff --git a/solr/core/src/java/org/apache/solr/cli/ConfigSetUploadTool.java b/solr/core/src/java/org/apache/solr/cli/ConfigSetUploadTool.java index 2e98ecf1eb1f..69b902064f41 100644 --- a/solr/core/src/java/org/apache/solr/cli/ConfigSetUploadTool.java +++ b/solr/core/src/java/org/apache/solr/cli/ConfigSetUploadTool.java @@ -70,16 +70,17 @@ public class ConfigSetUploadTool extends ToolBase { @picocli.CommandLine.Option( names = {"-d", "--conf-dir"}, - description = { - "Local directory for configs.", - "The local directory of the configuration set to upload. It should have a `conf` directory immediately below it that in turn contains `solrconfig.xml` etc.", - "", - "If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be checked for this name. An absolute path may be supplied instead.", - "", - "**Examples:**", - "* `-d directory_under_configsets`", - "* `-d /path/to/configset/source`" - }, + description = + """ + Local directory for configs. + The local directory of the configuration set to upload. It should have a `conf` directory immediately below it that in turn contains `solrconfig.xml` etc. + + If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be checked for this name. An absolute path may be supplied instead. + + **Examples:** + * `-d directory_under_configsets` + * `-d /path/to/configset/source` + """, required = true, paramLabel = "DIR") public String confDir; diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc index b6412348e4ff..342566fcf6a6 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-downconfig.adoc @@ -65,6 +65,8 @@ In either case, _pre-existing configurations at the destination will be overwrit * `-d directory_under_configsets` + * `-d /path/to/configset/destination` ++ + *-n*, *--conf-name*=__:: *(required)* Configset name in ZooKeeper. diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc index 8f7f3140443f..7353719867ff 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/cli/solr-zk-upconfig.adoc @@ -65,6 +65,8 @@ If just a name is supplied, `$SOLR_TIP/server/solr/configsets` will be checked f * `-d directory_under_configsets` + * `-d /path/to/configset/source` ++ + *-n*, *--conf-name*=__:: *(required)* Configset name in ZooKeeper.