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:
Noble Paul 2009-09-04 08:36:19 +00:00
parent b8654c1da9
commit 0f62586398
2 changed files with 5 additions and 7 deletions

View File

@ -207,6 +207,7 @@ public class SolrConfig extends Config {
valueSourceParserInfo = loadPluginInfo("valueSourceParser",true); valueSourceParserInfo = loadPluginInfo("valueSourceParser",true);
queryParserInfo = loadPluginInfo("queryParser",true); queryParserInfo = loadPluginInfo("queryParser",true);
searchComponentInfo = loadPluginInfo("searchComponent",true); searchComponentInfo = loadPluginInfo("searchComponent",true);
queryConverterInfo = loadPluginInfo("queryConverter",true);
directoryfactoryInfo = loadSinglePlugin("directoryFactory"); directoryfactoryInfo = loadSinglePlugin("directoryFactory");
deletionPolicyInfo = loadSinglePlugin("mainIndex/deletionPolicy"); deletionPolicyInfo = loadSinglePlugin("mainIndex/deletionPolicy");
indexReaderFactoryInfo = loadSinglePlugin("indexReaderFactory"); indexReaderFactoryInfo = loadSinglePlugin("indexReaderFactory");
@ -303,6 +304,7 @@ public class SolrConfig extends Config {
protected PluginInfo deletionPolicyInfo; protected PluginInfo deletionPolicyInfo;
protected PluginInfo indexReaderFactoryInfo; protected PluginInfo indexReaderFactoryInfo;
protected List<PluginInfo> newSearcherListenerInfo; protected List<PluginInfo> newSearcherListenerInfo;
private List<PluginInfo> queryConverterInfo;
protected PluginInfo directoryfactoryInfo; protected PluginInfo directoryfactoryInfo;
protected Map<String ,List<PluginInfo>> updateProcessorChainInfo ; protected Map<String ,List<PluginInfo>> updateProcessorChainInfo ;
protected UpdateHandlerInfo updateHandlerInfo ; protected UpdateHandlerInfo updateHandlerInfo ;
@ -484,6 +486,8 @@ public class SolrConfig extends Config {
public Map<String, List<PluginInfo>> getUpdateProcessorChainInfo() { return updateProcessorChainInfo; } public Map<String, List<PluginInfo>> getUpdateProcessorChainInfo() { return updateProcessorChainInfo; }
public List<PluginInfo> getQueryConverterInfo() { return queryConverterInfo; }
public UpdateHandlerInfo getUpdateHandlerInfo() { return updateHandlerInfo; } public UpdateHandlerInfo getUpdateHandlerInfo() { return updateHandlerInfo; }
public PluginInfo getIndexReaderFactoryInfo() { return indexReaderFactoryInfo; } public PluginInfo getIndexReaderFactoryInfo() { return indexReaderFactoryInfo; }

View File

@ -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>(); Map<String, QueryConverter> queryConverters = new HashMap<String, QueryConverter>();
NamedListPluginLoader<QueryConverter> loader = core.initPlugins(core.getSolrConfig().getQueryConverterInfo(), queryConverters,QueryConverter.class);
new NamedListPluginLoader<QueryConverter>("[solrconfig.xml] " + xpath, queryConverters);
loader.load(solrConfig.getResourceLoader(), nodes);
//ensure that there is at least one query converter defined //ensure that there is at least one query converter defined
if (queryConverters.size() == 0) { if (queryConverters.size() == 0) {