Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法限制从 SOLR 返回的搜索结果的数量。我正在为希望将搜索结果限制为 100(基于搜索分数)的客户工作。我可以使用行,但这只会限制每页的结果,而不是总结果。这样做的问题是,如果使用 SOLR 的排序功能,它将对所有结果进行排序,并且基于分数排名第 105 位的产品可能会因为价格低廉而排在首位。我希望排序只发生在前 100 个结果中。有没有办法做到这一点 ?
谢谢你的帮助!
苏普雷特
您可以使用排序功能。
您将不得不以正常方式查询rows=100并添加&sort=<query>.
rows=100
&sort=<query>
我无法尝试,因为我现在没有 Solr 实例。请让我知道 ti 是否有效。