WebSolr如何支持没有q参数的查询
当我提交一个没有WebSolr如何支持没有q参数的查询,solr,websolr,Solr,Websolr,当我提交一个没有q参数的solr查询时,我得到了空指针异常 # This works http://localhost:8991/solr/select?q=hello # This throws Null pointer exception http://localhost:8991/solr/select 但是当我使用WebSolr时,不带q参数的查询将返回所有文档(我假设q被分配给*:*)。是否有支持此行为的solr配置?请尝试以下操作: <requestHandler name
q
参数的solr查询时,我得到了空指针异常
# This works
http://localhost:8991/solr/select?q=hello
# This throws Null pointer exception
http://localhost:8991/solr/select
但是当我使用WebSolr时,不带
q
参数的查询将返回所有文档(我假设q被分配给*:*
)。是否有支持此行为的solr配置?请尝试以下操作:
<requestHandler name="standard" class="solr.StandardRequestHandler" default="true">
<lst name="defaults">
<str name="q">*:*</str>
</lst>
</requestHandler>
*:*
我尝试了此解决方案,但仍然得到空指针异常。在上面的代码中,请尝试将第一行更改为以下内容:-阅读“standard”是遗留/不推荐的内容要更清楚,requestHandler应该放在solrconfig.xml中