lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r811281 - in /lucene/solr/trunk/src/java/org/apache/solr: core/SolrConfig.java handler/component/SpellCheckComponent.java
Date Fri, 04 Sep 2009 08:36:19 GMT
Author: noble
Date: Fri Sep  4 08:36:19 2009
New Revision: 811281

URL: http://svn.apache.org/viewvc?rev=811281&view=rev
Log:
SOLR-1198. QueryConverter was missed

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
    lucene/solr/trunk/src/java/org/apache/solr/handler/component/SpellCheckComponent.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java?rev=811281&r1=811280&r2=811281&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java Fri Sep  4 08:36:19 2009
@@ -207,6 +207,7 @@
     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 @@
   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 Map<String, List<PluginInfo>> getUpdateProcessorChainInfo() { return
updateProcessorChainInfo; }
 
+  public List<PluginInfo> getQueryConverterInfo() { return queryConverterInfo; }
+
   public UpdateHandlerInfo getUpdateHandlerInfo() { return updateHandlerInfo; }
 
   public PluginInfo getIndexReaderFactoryInfo() { return indexReaderFactoryInfo; }

Modified: lucene/solr/trunk/src/java/org/apache/solr/handler/component/SpellCheckComponent.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/handler/component/SpellCheckComponent.java?rev=811281&r1=811280&r2=811281&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/handler/component/SpellCheckComponent.java
(original)
+++ lucene/solr/trunk/src/java/org/apache/solr/handler/component/SpellCheckComponent.java
Fri Sep  4 08:36:19 2009
@@ -293,15 +293,9 @@
           }
         }
      }
-      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) {



Mime
View raw message