mirror of https://github.com/apache/lucene.git
SOLR-5195 - remove SolrCore reference from UIMAUpdateRequestProcessor
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1518018 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cb439e9482
commit
082f6e4d2e
|
@ -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;
|
||||
|
@ -49,18 +48,15 @@ public class UIMAUpdateRequestProcessor extends UpdateRequestProcessor {
|
|||
|
||||
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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue