首页 > 解决方案 > 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.

标签: solr

解决方案


是的,这是为 7.3.0 实现的。请参阅SOLR-11854 - multiValued PrimitiveFieldType 应基于 asc/desc 关键字隐式按 min/max 排序

要了解版本之间是否发生了变化,请参阅新版本的变更日志。这列在“新功能”部分下:

SOLR-11854:现在可以通过隐式选择 asc/desc 排序顺序的最小/最大值来对多值原始字段进行排序。(主人)


推荐阅读