mirror of https://github.com/apache/lucene.git
SOLR-1198. QueryConverter was missed
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@811281 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b8654c1da9
commit
0f62586398
|
@ -207,6 +207,7 @@ public class SolrConfig extends Config {
|
|||
valueSourceParserInfo = loadPluginInfo("valueSourceParser",true);
|
||||
queryParserInfo = loadPluginInfo("queryParser",true);
|
||||
searchComponentInfo = loadPluginInfo("searchComponent",true);
|
||||
queryConverterInfo = loadPluginInfo("queryConverter",true);
|
||||
directoryfactoryInfo = loadSinglePlugin("directoryFactory");
|
||||
deletionPolicyInfo = loadSinglePlugin("mainIndex/deletionPolicy");
|
||||
indexReaderFactoryInfo = loadSinglePlugin("indexReaderFactory");
|
||||
|
@ -303,6 +304,7 @@ public class SolrConfig extends Config {
|
|||
protected PluginInfo deletionPolicyInfo;
|
||||
protected PluginInfo indexReaderFactoryInfo;
|
||||
protected List<PluginInfo> newSearcherListenerInfo;
|
||||
private List<PluginInfo> queryConverterInfo;
|
||||
protected PluginInfo directoryfactoryInfo;
|
||||
protected Map<String ,List<PluginInfo>> updateProcessorChainInfo ;
|
||||
protected UpdateHandlerInfo updateHandlerInfo ;
|
||||
|
@ -484,6 +486,8 @@ public class SolrConfig extends Config {
|
|||
|
||||
public Map<String, List<PluginInfo>> getUpdateProcessorChainInfo() { return updateProcessorChainInfo; }
|
||||
|
||||
public List<PluginInfo> getQueryConverterInfo() { return queryConverterInfo; }
|
||||
|
||||
public UpdateHandlerInfo getUpdateHandlerInfo() { return updateHandlerInfo; }
|
||||
|
||||
public PluginInfo getIndexReaderFactoryInfo() { return indexReaderFactoryInfo; }
|
||||
|
|
|
@ -293,15 +293,9 @@ public class SpellCheckComponent extends SearchComponent implements SolrCoreAwar
|
|||
}
|
||||
}
|
||||
}
|
||||
String xpath = "queryConverter";
|
||||
SolrConfig solrConfig = core.getSolrConfig();
|
||||
NodeList nodes = (NodeList) solrConfig.evaluate(xpath, XPathConstants.NODESET);
|
||||
|
||||
Map<String, QueryConverter> queryConverters = new HashMap<String, QueryConverter>();
|
||||
NamedListPluginLoader<QueryConverter> loader =
|
||||
new NamedListPluginLoader<QueryConverter>("[solrconfig.xml] " + xpath, queryConverters);
|
||||
|
||||
loader.load(solrConfig.getResourceLoader(), nodes);
|
||||
core.initPlugins(core.getSolrConfig().getQueryConverterInfo(), queryConverters,QueryConverter.class);
|
||||
|
||||
//ensure that there is at least one query converter defined
|
||||
if (queryConverters.size() == 0) {
|
||||
|
|
Loading…
Reference in New Issue