我正在尝试在我的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 *]"
两次回应?