如何在 solrconfig.xml 的 requestHandler 中使用 fq



我正试图在我的solrconfig.xml文件上设置我的requestHandler以使用fq。下面是我的代码:

<requestHandler name="/safe" class="com.orestis.custom.solr.handlers.SafeSearchRequestHandler">
    <lst name="defaults">
       <int name="rows">1</int>
       <str name="fl">bookPrice,bookCode,bookAuthor,bookPublishDate</str>
       <str name="fq">bookPublishDate</str>
       <str name="wt">json</str>
       <str name="sort">bookPrice asc</str>
    </lst>
    <lst name="variants">
       <str name="q">*:*</str>
       <str name="printParams">all</str>
    </lst>
    <lst name="allowed">
       <str name="q" />
       <str name="fq" />
       <str name="rows" />
       <str name="wt" />
       <str name="indent" />
       <str name="fl"/>
       <str name="sort"/>
       <str name="sfield"/>
       <str name="pt"/>
       <str name="group"/>
       <str name="group.field"/>
       <str name="group.main"/>
       <str name="group.limit"/>
       <str name="group.sort"/>
       <str name="group.query"/>
       <str name="echoParams"/>
    </lst>  
    <lst name="minMaxList">
       <str name="rows">1,3</str>
     </lst>
  </requestHandler>

问题是,当我试图访问:http://solr.mysite.com/solr/BookStore/safe?q=fl=bookPrice,bookCode,bookAuthor,bookPublishDate&fq=bookPublishDate:[NOW/HOUR%2B6HOURS%20TO%20*]在我的浏览器上我得到这个:

{"responseHeader":{"status":0,"QTime":448,"params":{"printParams":"all","fl":"bookPrice,bookCode,bookAuthor,bookPublishDate","sort":"bookPrice asc","q":["*:*","*:*"],"wt":"json","fq":["bookPublishDate:[NOW/HOUR+6HOURS TO *]","bookPublishDate:[NOW/HOUR+6HOURS TO *]"],"rows":"1"}}...response continues

任何想法为什么我得到"bookPublishDate:[NOW/HOUR+6HOURS TO *]"两次的响应?

q=fl=bookPrice,bookCode,bookAuthor,bookPublishDate我看不对

试试http://solr.mysite.com/solr/BookStore/safe?q=*:*&fq=bookPublishDate:[NOW/HOUR%2B6HOURS%20TO%20*]

相关内容

  • 没有找到相关文章

最新更新