Skip to content

Commit

Permalink
SOLR-16254: Clarify when a create needs to be run on the same server …
Browse files Browse the repository at this point in the history
…as Solr. (#2698)

* Introduce new header for help text to clarify when you must run on the same server as solr.

* small formatting tweak to improve whitespace in cli output

* use similar text for similar meaning
  • Loading branch information
epugh authored Sep 11, 2024
1 parent 5bc7c16 commit 14c9575
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ Bug Fixes

* SOLR-17416: Fixed ExportHandler bug that silently suppressed errors and returned partial results in some situations (hossman)

* SOLR-16254: Clarify when a bin/solr create needs to be run on the same server as Solr. (Eric Pugh)

Dependency Upgrades
---------------------
(No changes)
Expand Down
2 changes: 1 addition & 1 deletion solr/core/src/java/org/apache/solr/cli/AuthTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public String getUsage() {

@Override
public String getHeader() {
return "\nUpdates or enables/disables authentication. Must be run on the machine hosting Solr.\n"
return "Updates or enables/disables authentication. Must be run on the Solr server itself.\n"
+ "\n"
+ "List of options:";
}
Expand Down
8 changes: 8 additions & 0 deletions solr/core/src/java/org/apache/solr/cli/CreateTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ public String getName() {
return "create";
}

@Override
public String getHeader() {
return "Creates a core or collection depending on whether Solr is running in standalone (core) or SolrCloud mode (collection).\n"
+ "If you are using standalone mode you must run this command on the Solr server itself.\n"
+ "\n"
+ "List of options:";
}

@Override
public List<Option> getOptions() {
return List.of(
Expand Down
2 changes: 1 addition & 1 deletion solr/core/src/java/org/apache/solr/cli/DeleteTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public String getName() {

@Override
public String getHeader() {
return "\nDeletes a core or collection depending on whether Solr is running in standalone (core) or SolrCloud"
return "Deletes a core or collection depending on whether Solr is running in standalone (core) or SolrCloud"
+ " mode (collection). If you're deleting a collection in SolrCloud mode, the default behavior is to also"
+ " delete the configuration directory from Zookeeper so long as it is not being used by another collection.\n"
+ " You can override this behavior by passing -deleteConfig false when running this command.\n"
Expand Down

0 comments on commit 14c9575

Please sign in to comment.