mirror of https://github.com/apache/lucene.git
SOLR-350 -- change the multicore initialization path in the DispatchFilter to use an existing MultiCore configuration if it is already configured.
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@611821 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
981d977eef
commit
5bfe7bff4c
|
@ -71,15 +71,20 @@ public class SolrDispatchFilter implements Filter
|
|||
// Find a valid solr core
|
||||
SolrCore core = null;
|
||||
multicore = MultiCore.getRegistry();
|
||||
String instanceDir = SolrResourceLoader.locateInstanceDir();
|
||||
File multiconfig = new File( instanceDir, "multicore.xml" );
|
||||
log.info( "looking for multicore.xml: "+multiconfig.getAbsolutePath() );
|
||||
if( multiconfig.exists() ) {
|
||||
multicore.load( instanceDir, multiconfig );
|
||||
core = multicore.getDefaultCore();
|
||||
if( multicore.isEnabled() ) {
|
||||
log.info( "Using existing multicore configuration" );
|
||||
}
|
||||
else {
|
||||
String instanceDir = SolrResourceLoader.locateInstanceDir();
|
||||
File multiconfig = new File( instanceDir, "multicore.xml" );
|
||||
log.info( "looking for multicore.xml: "+multiconfig.getAbsolutePath() );
|
||||
if( multiconfig.exists() ) {
|
||||
multicore.load( instanceDir, multiconfig );
|
||||
}
|
||||
}
|
||||
if( multicore.isEnabled() ) {
|
||||
singlecore = null;
|
||||
core = multicore.getDefaultCore();
|
||||
}
|
||||
else {
|
||||
singlecore = new SolrCore( null, null, new SolrConfig(), null );
|
||||
|
|
Loading…
Reference in New Issue