diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java index c7ef117751a..4f57b862686 100644 --- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java +++ b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java @@ -20,7 +20,6 @@ package org.apache.solr.uima.processor; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.core.SolrCore; import org.apache.solr.schema.SchemaField; import org.apache.solr.uima.processor.SolrUIMAConfiguration.MapField; import org.apache.lucene.analysis.uima.ae.AEProvider; @@ -48,19 +47,16 @@ public class UIMAUpdateRequestProcessor extends UpdateRequestProcessor { SolrUIMAConfiguration solrUIMAConfiguration; private AEProvider aeProvider; - - private SolrCore solrCore; - public UIMAUpdateRequestProcessor(UpdateRequestProcessor next, SolrCore solrCore, + public UIMAUpdateRequestProcessor(UpdateRequestProcessor next, String coreName, SolrUIMAConfiguration config) { super(next); - initialize(solrCore, config); + initialize(coreName, config); } - private void initialize(SolrCore solrCore, SolrUIMAConfiguration config) { - this.solrCore = solrCore; + private void initialize(String coreName, SolrUIMAConfiguration config) { solrUIMAConfiguration = config; - aeProvider = AEProviderFactory.getInstance().getAEProvider(solrCore.getName(), + aeProvider = AEProviderFactory.getInstance().getAEProvider(coreName, solrUIMAConfiguration.getAePath(), solrUIMAConfiguration.getRuntimeParameters()); } diff --git a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java index 0855f4c397b..c088df8ff89 100644 --- a/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java +++ b/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.java @@ -41,7 +41,7 @@ public class UIMAUpdateRequestProcessorFactory extends UpdateRequestProcessorFac @Override public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) { - return new UIMAUpdateRequestProcessor(next, req.getCore(), + return new UIMAUpdateRequestProcessor(next, req.getCore().getName(), new SolrUIMAConfigurationReader(args).readSolrUIMAConfiguration()); }