From 703272f23d4cd62868a4707e6eeeb2c2fa296aea Mon Sep 17 00:00:00 2001 From: Eugene Livis Date: Tue, 5 May 2020 14:06:21 -0400 Subject: [PATCH] More work to support Solr4 --- .../sleuthkit/autopsy/keywordsearch/Server.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java index 772256078f..e1221d8068 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Server.java @@ -278,7 +278,7 @@ public class Server { // variable to the Solr script but it can be overridden by the user in // either autopsy-solr.cmd or autopsy-solr-in.cmd. javaPath = PlatformUtil.getJavaPath(); - javaPath = "java"; // ELTODO + //javaPath = "java"; // ELTODO // This is our customized version of the Solr batch script to start/stop Solr. solr8CmdPath = Paths.get(solr8Folder.getAbsolutePath(), "bin", "autopsy-solr.cmd"); //NON-NLS @@ -490,6 +490,7 @@ public class Server { private Process runSolr4Command(List solrArguments) throws IOException { final String MAX_SOLR_MEM_MB_PAR = "-Xmx" + UserPreferences.getMaxSolrVMSize() + "m"; //NON-NLS + String javaPath = "java"; // ELTODO List commandLine = new ArrayList<>(); commandLine.add(javaPath); commandLine.add(MAX_SOLR_MEM_MB_PAR); @@ -551,7 +552,13 @@ public class Server { } void start() throws KeywordSearchModuleException, SolrServerNoPortException { - startSolr4(); + startSolr8(); + + //startSolr4(); + + //startSolr8(); + + //startSolr4(); } /** @@ -564,7 +571,7 @@ public class Server { void startSolr8() throws KeywordSearchModuleException, SolrServerNoPortException { if (isEmbeddedSolrRunning()) { // If a Solr server is running we stop it. - stop(); + stop(); // ELTODO - make sure to stop the correct server it may be solr4 running } if (!isPortAvailable(currentSolrServerPort)) { @@ -652,7 +659,7 @@ public class Server { void startSolr4() throws KeywordSearchModuleException, SolrServerNoPortException { if (isEmbeddedSolrRunning()) { // If a Solr server is running we stop it. - stopSolr4(); + stopSolr4(); // ELTODO - make sure to stop the correct server, it may be solr8 running } if (!isPortAvailable(currentSolrServerPort)) {