Server server = new Server(solrPort);
WebAppContext ctx = new WebAppContext(solrWarPath, "/solr");
// The reason to change the classloading behavior was primarily so that the logging libraries would
// be inherited, and hence that Solr would use the same logging system & conf.
ctx.setParentLoaderPriority(true);
server.addHandler(ctx);
return server;
}
public String getDefaultUri() {
return "http://localhost:" + solrPort + "/solr/" + SolrDefinition.DEFAULT_CORE_NAME;