Skip to content
Snippets Groups Projects
Commit ef88080e authored by Thomas Mortagne's avatar Thomas Mortagne
Browse files

XWIKI-18769: Upgrade to Solr 8.11.2

* disable the Solr Log Watcher until Solr support slf4j2
parent c6f2f158
No related branches found
No related tags found
No related merge requests found
......@@ -47,9 +47,9 @@
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer;
import org.apache.solr.core.CoreContainer;
import org.apache.solr.core.SolrCore;
import org.apache.solr.core.CoreContainer.CoreLoadFailure;
import org.apache.solr.core.CoreDescriptor;
import org.apache.solr.core.SolrCore;
import org.xwiki.component.annotation.Component;
import org.xwiki.component.annotation.DisposePriority;
import org.xwiki.component.phase.Disposable;
......@@ -291,7 +291,13 @@ private void createHomeDirectory() throws IOException
Files.createDirectories(this.solrHomePath);
// Copy the default solr.xml configuration file
FileUtils.write(this.solrHomePath.resolve("solr.xml").toFile(), "<solr/>", StandardCharsets.UTF_8);
StringBuilder builder = new StringBuilder();
builder.append("<solr>");
// Disable the log watcher until Solr support SLF4J 2
// FIXME: remove when Solr upgrade SLF4J (or stop logging a stack trace at least)
builder.append("<logging><str name=\"enabled\">false</str></logging>");
builder.append("</solr>");
FileUtils.write(this.solrHomePath.resolve("solr.xml").toFile(), builder.toString(), StandardCharsets.UTF_8);
// [RETRO COMPATIBILITY for < 12.3]
// Check if the solr home is not already at the old location (/solr) and move things
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment