扩展 RequestHandlerBase

RequestHandlerBase 实现接口SolrRequestHandler

SearchHandler:

它的所有逻辑来自 搜索组件SearchComponents.  handler配置中,如果没有显示声明组件元素的话,它会使用默认的组件:

  自定义组件:

  可以通过配置handler的components元素来实现:

<arr name="components">
     <str>query</str>
     <str>facet</str>
     <str>mlt</str>
     <str>highlight</str>
     <str>debug</str>
     <str>someothercomponent</str>
   </arr>
<arr name="first-components">
     <str>mycomponent</str>
   </arr>

   <arr name="last-components">
     <str>myothercomponent</str>
   </arr>

除默认组件外,上面用到的组件都应该在solrconfig.xml中进行配置。

http://wiki.apache.org/solr/SearchHandler

http://blog.csdn.net/pelick/article/details/8502437

原文地址:https://www.cnblogs.com/ydxblog/p/5673333.html