Skip to content

Commit

Permalink
Ensure modules enabled for 'techproduct' example
Browse files Browse the repository at this point in the history
  • Loading branch information
gerlowskija committed Dec 2, 2024
1 parent aeca4d1 commit cb1a166
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 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 @@ -647,6 +647,11 @@ protected Map<String, Object> startSolr(
if (!isWindows && cwdPath.length() > 1 && solrHome.startsWith(cwdPath))
solrHome = solrHome.substring(cwdPath.length() + 1);

final var syspropArg =
("techproducts".equals(cli.getOptionValue("example")))
? "-Dsolr.modules=clustering,extraction,langid,ltr,scripting -Dsolr.ltr.enabled=true -Dsolr.clustering.enabled=true"
: "";

String startCmd =
String.format(
Locale.ROOT,
Expand All @@ -661,7 +666,8 @@ protected Map<String, Object> startSolr(
forceArg,
verboseArg,
extraArgs,
jvmOptsArg);
jvmOptsArg,
syspropArg);
startCmd = startCmd.replaceAll("\\s+", " ").trim(); // for pretty printing

echo("\nStarting up Solr on port " + port + " using command:");
Expand Down

0 comments on commit cb1a166

Please sign in to comment.