Hi,
I'm using a solr nightly build and I have created my own
QueryComponent which is just a subclass of the default
QueryComponent. FYI, in most cases I just delegate to the superclass,
but I also allow a parameter to be used which will cause some custom
filtering (which is why I'm doing all this in the first place).
Anyway, it's working great. The only question I have is have I
registered QueryComponent incorrectly in solrconfig.xml as I get this
exception when I start solr:
Jan 7, 2008 11:41:22 AM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: Multiple
searchComponent registered to the same name: query ignoring:
[EMAIL PROTECTED]
at org.apache.solr.util.plugin.AbstractPluginLoader.load
(AbstractPluginLoader.java:153)
at org.apache.solr.core.SolrCore.loadSearchComponents
(SolrCore.java:504)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:333)
at org.apache.solr.servlet.SolrDispatchFilter.init
(SolrDispatchFilter.java:85)
at org.mortbay.jetty.servlet.FilterHolder.doStart
(FilterHolder.java:99)
at org.mortbay.component.AbstractLifeCycle.start
(AbstractLifeCycle.java:40)
This is how I've done registered the QueryComponent (with the
relevant note from the example solrconfig.xml)
sorlconfig.xml
...
<!--
Search components are registered to SolrCore and used by Search
Handlers
By default, the following components are avaliable:
<searchComponent name="query"
class="org.apache.solr.handler.component.QueryComponent" />
<searchComponent name="facet"
class="org.apache.solr.handler.component.FacetComponent" />
<searchComponent name="mlt"
class="org.apache.solr.handler.component.MoreLikeThisComponent" />
<searchComponent name="highlight"
class="org.apache.solr.handler.component.HighlightComponent" />
<searchComponent name="debug"
class="org.apache.solr.handler.component.DebugComponent" />
If you register a searchComponent to one of the standard names,
that will be used instead.
-->
<!-- Override searching with our own custom implentation -->
<searchComponent name="query"
class="com.mybiz.solr.handler.component.MyQueryComponent" />
...
It doesn't cause any other issue or problem, just a bit scary for
people looking at the logs. Is this normal or have I incorrectly
registered my QueryComponent?
Thanks!