: did you, Hoss, not say that components are referred to by name? How 
: could the search result be read from the query mySpecialQueryComponent 
: if it cannot be named? Simply through the pool of SolrParams?

in the example i gave, "mySpecialQueryComponent" *is* the name of some 
component you have already defined -- instead of using the component named 
"query" which has also already been defined (either implicitly as a 
default or explicitly in the config)

As i keep saying: if you look at the 1.4.1 example solrconfig.xml, there 
are several examples of this (and the example solrconfig.xml that will be 
in the Solr 3.1 is even better)...

>From 1.4.1...

   By default, the following components are avaliable:
    
   <searchComponent name="query"     
   class="org.apache.solr.handler.component.QueryComponent" />

        ...
   
   Default configuration in a requestHandler would look like:
    <arr name="components">
      <str>query</str>
      <str>facet</str>
      <str>mlt</str>
      <str>highlight</str>
      <str>stats</str>
      <str>debug</str>
    </arr>

    If you register a searchComponent to one of the standard names, that 
    will be used instead. 

        ...

  <!-- A component to return terms and document frequency of those terms.
       This component does not yet support distributed search. -->
  <searchComponent name="termsComponent" 
  class="org.apache.solr.handler.component.TermsComponent"/>

  <requestHandler name="/terms" 
  class="org.apache.solr.handler.component.SearchHandler">
     <lst name="defaults">
      <bool name="terms">true</bool>
    </lst>     
    <arr name="components">
      <str>termsComponent</str>
    </arr>
  </requestHandler>



-Hoss

Reply via email to