solr - multivalued field sorting on SOLR 7.2.1
问题描述
i use a server with solr 7.3.0 for testing. my scheme has some multivalued string fields like
<field name="rating" type="string" omitNorms="true" multiValued="true" indexed="true" stored="true"/>
On solr 7.3.0 a url query for sorting for the field "rating" works fine. Something like this:
server-name1:8983/sorl/core/search?q=*&sort=rating DESC
But recently i use a slave and the above mentioned solr 7.3.0 server is the master server. The slave has a lesser version (7.2.1) installed. Because the server exists longer and this was was the latest version back then. I never bothered to update this yet. But now the same query as above
server-name2:8983/sorl/core/search?q=*&sort=rating DESC
returns a error message:
"msg":"can not sort on multivalued field:rating"
My question is: is this just a recently implemented feature or did i miss something? I could update to 7.3.0 for the slave as well, but it just want to be sure if this is just a version issue.
解决方案
是的,这是为 7.3.0 实现的。请参阅SOLR-11854 - multiValued PrimitiveFieldType 应基于 asc/desc 关键字隐式按 min/max 排序。
要了解版本之间是否发生了变化,请参阅新版本的变更日志。这列在“新功能”部分下:
SOLR-11854:现在可以通过隐式选择 asc/desc 排序顺序的最小/最大值来对多值原始字段进行排序。(主人)
推荐阅读
- sql - 查询查找第二个字段不同的重复记录
- python - gensim lemmatize 错误生成器引发 StopIteration
- java - 具有需要枚举参数的注释的 clojure gen-class
- python - 使用 pyinstaller 将 .py 转换为 .exe 后缺少模块
- c++ - QTcpSocket:通信数小时后服务器响应延迟
- r - 为什么在 R 中使用管道运算符会出现以下错误?
- express - cookie 中的 Express Gateway JWT 验证
- asp.net-mvc - 如何在.Net Core 2.2中通过ajax调用处理AutoValidateAntiForgeryToken
- css - 为什么 safari 有时无法快速响应 CSS?
- path - 邮递员从 csv 数据文件中读取。每次迭代都需要新的 url