Skip to content

Commit

Permalink
SOLR-17595: Fix Solr examples for Windows (apache#2909)
Browse files Browse the repository at this point in the history
* Fix argument parsing for -D options with multiple values on Windows

* Fix invalid usage of wildcards in RunExampleTool / PostTool

(cherry picked from commit a4229e7)
  • Loading branch information
malliaridis committed Dec 17, 2024
1 parent 1e9bcb7 commit 9a6a4ab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ Bug Fixes

* SOLR-17586: Print zkcli.sh deprecation msg to stderr, which fixes Solr Operator upload of security.json to zookeeper (Jan Høydahl)

* SOLR-17595: Fix two issues in Solr CLI that prevent Solr from starting with the techproducts example and from
correctly parsing arguments on Windows that start with -D and have multiple values separated by "," or spaces. (Christos Malliaridis)

Dependency Upgrades
---------------------
(No changes)
Expand Down
1 change: 0 additions & 1 deletion solr/bin/solr.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,6 @@ goto repeat_passthru

:end_passthru
set "PASSTHRU=%PASSTHRU_KEY%=%PASSTHRU_VALUES%"
echo "Passing through %PASSTHRU%"

IF NOT "%SOLR_OPTS%"=="" (
set "SOLR_OPTS=%SOLR_OPTS% %PASSTHRU%"
Expand Down
4 changes: 3 additions & 1 deletion solr/core/src/java/org/apache/solr/cli/RunExampleTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,9 @@ protected void runExample(CommandLine cli, String exampleName) throws Exception
collectionName,
"--type",
"application/xml",
exampledocsDir.getAbsolutePath() + "/*.xml"
"--filetypes",
"xml",
exampledocsDir.toAbsolutePath().toString()
};
PostTool postTool = new PostTool();
CommandLine postToolCli = SolrCLI.parseCmdLine(postTool, args);
Expand Down

0 comments on commit 9a6a4ab

Please sign in to comment.