自定义请求处理程序不适用于Apache Solrv8中的Qt Param

问题描述

我在solrconfig.xml中创建了一个自定义请求处理程序,如下所示:

<requestHandler name="/mysearch" class="solr.SearchHandler">
    <lst name="defaults">
      <str name="echoParams">explicit</str>

      <!-- Query settings -->
      <str name="defType">edismax</str>
      <str name="qf">
        title^10.0
      </str>
      <str name="pf">
        title^10.0 ph_title^5.0
      </str>
      <int name="ps">5</int>
      <str name="mm">3&lt;75% 9&lt;50%</str>
      <str name="q.alt">:</str>
      <str name="rows">10</str>
      <str name="fl">id,score</str>

      <str name="mlt.fl">state_exact</str>
      <str name="mlt.qf">
        vertical^1000.0
      </str>
      <int name="mlt.count">10</int>
      <int name="mlt.mintf">1</int>
      <int name="mlt.mindf">10</int>
      <int name="mlt.minwl">3</int>
      <bool name="mlt.boost">true</bool>
      <bool name="mlt.match.include">false</bool>

    </lst>

    <!-- append spellchecking to our list of components -->
    <arr name="last-components">
      <str>mysearch_spellcheck</str>
    </arr>
  </requestHandler>

但是当我调用此API时:

http://10.24.7.13:8983/solr/docs/select?q=test&qt=/mysearch&fq=whitelist_cities:(Ghaziabad+OR+ALL_CITIES)&fq=-blacklist_states:(Uttar+Pradesh)&fq=whitelist_states:(Uttar+Pradesh+OR+ALL_STATES)&fq=-blacklist_pincodes:(201005+OR+BLOCK_ALL_PINCODES)&fq=whitelist_pincodes:(201005+OR+ALL_PINCODES)

上面的请求处理程序没有被使用,而是使用认的/ select处理程序,即使自定义是在qt中传递的。

但是,当我按下此键时:

http://10.24.7.13:8983/solr/docs/mysearch?q=test&fq=whitelist_cities:(Ghaziabad+OR+ALL_CITIES)&fq=-blacklist_states:(Uttar+Pradesh)&fq=whitelist_states:(Uttar+Pradesh+OR+ALL_STATES)&fq=-blacklist_pincodes:(201005+OR+BLOCK_ALL_PINCODES)&fq=whitelist_pincodes:(201005+OR+ALL_PINCODES)

它按预期使用自定义请求处理程序。

为什么即使给出qt,第一种情况也不采用自定义请求处理程序?

任何帮助将不胜感激,在此先感谢:)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)