From cb1a1663eb33b5baf0a0e360dc483243c816523b Mon Sep 17 00:00:00 2001 From: Jason Gerlowski Date: Mon, 2 Dec 2024 11:25:01 -0500 Subject: [PATCH] Ensure modules enabled for 'techproduct' example --- .../core/src/java/org/apache/solr/cli/RunExampleTool.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java b/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java index 783d58e0a57..04b0a5b21e4 100644 --- a/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java +++ b/solr/core/src/java/org/apache/solr/cli/RunExampleTool.java @@ -647,6 +647,11 @@ protected Map 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, @@ -661,7 +666,8 @@ protected Map startSolr( forceArg, verboseArg, extraArgs, - jvmOptsArg); + jvmOptsArg, + syspropArg); startCmd = startCmd.replaceAll("\\s+", " ").trim(); // for pretty printing echo("\nStarting up Solr on port " + port + " using command:");