[英]Solr: How to pass a multivalued request parameter as a “local parameter” in a nested query?
I am constructing a nested Solr DisMax query of the format: _query_:"{!edismax qf=...}...
. Now I need to add several boosting queries (bq-parameter), but simply writing _query_:"{!edismax qf=... bq=foo bq=bar}
doesn't seem to work as only one of the bq-keys is processed and the rest are ignored. 我正在构建以下格式的嵌套Solr DisMax查询: _query_:"{!edismax qf=...}...
现在,我需要添加几个增强查询(bq参数),但只需编写_query_:"{!edismax qf=... bq=foo bq=bar}
似乎不起作用,因为仅处理了一个bq键,其余的均被忽略。 Is it possible to pass multivalued parameters as LocalParams ? 是否可以将多值参数作为LocalParams传递?
Multivalued local parameters turned out to be not implemented at the moment. 事实证明,目前尚未实现多值局部参数。 Here's a CR for that - https://issues.apache.org/jira/browse/SOLR-2798 这是一个CR- https://issues.apache.org/jira/browse/SOLR-2798
Instead of using localparams and complicating the query try using a new request handler. 代替使用localparams并使查询复杂化,请尝试使用新的请求处理程序。
The multiple bq parameters can be specified easily and should work fine and should be easier to understand. 可以很容易地指定多个bq参数,它们应该可以正常工作并且更容易理解。
<requestHandler name="edismax" class="solr.SearchHandler" >
<lst name="defaults">
<str name="defType">edismax</str>
<str name="qf">
title
</str>
<str name="bq">
foo bar
</str>
<str name="fl">
*,score
</str>
<int name="ps">100</int>
<str name="q.alt">*:*</str>
</lst>
</requestHandler>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.