Author: rwesten
Date: Fri Dec  6 16:37:18 2013
New Revision: 1548584

URL: http://svn.apache.org/r1548584
Log:
STANBOL-1232: fixed a bug where the SolrCore field is not initialised when the 
SolrYardIndexingDestination is initialised with a SolrCore referenced by an 
absolute path

Modified:
    
stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java

Modified: 
stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java
URL: 
http://svn.apache.org/viewvc/stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java?rev=1548584&r1=1548583&r2=1548584&view=diff
==============================================================================
--- 
stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java
 (original)
+++ 
stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java
 Fri Dec  6 16:37:18 2013
@@ -637,6 +637,7 @@ public class SolrYardIndexingDestination
                 solrServerRef,solrYardConfig.getIndexConfigurationName());
             if(server != null){
                 log.info("   ... initialised SolrCore with default 
configuration");
+                this.core = 
server.getCoreContainer().getCore(solrServerRef.getIndex());
             } else if(solrServerRef.isPath() && new 
File(solrServerRef.getIndex()).isAbsolute()){
                 //the parsed absolute path is not within the managed SolrServer
                 //so we need to create some CoreContainer and init/register
@@ -650,7 +651,7 @@ public class SolrYardIndexingDestination
                 CoreContainer cc = s.getCoreContainer();
                 CoreDescriptor cd = new CoreDescriptor(cc, "dummy", 
                     solrServerRef.getIndex());
-                SolrCore core = cc.create(cd);
+                this.core = cc.create(cd);
                 cc.register(core, false);
                 server = new EmbeddedSolrServer(cc, "dummy");
                 log.info("   ... initialised existing SolrCore at 
{}",solrServerRef.getIndex());
@@ -660,7 +661,6 @@ public class SolrYardIndexingDestination
         }
         log.info("   ... create SolrYard");
         this.solrYard = new SolrYard(server,solrYardConfig, 
namespacePrefixService);
-        this.core = 
server.getCoreContainer().getCore(solrServerRef.getIndex());
     }
 
     @Override


Reply via email to