答案 0 :(得分:2)
可以对文档进行排序,前提是文档字段是非标记化的(即:没有分析器)或使用仅生成单个术语的分析器(即:使用KeywordTokenizer)
它应该multiValued="false" indexed="true"
检查分析仪的字段productType
为您的字段solr.TextField
将类从solr.StrField
更改为productTye
可能有所帮助。
答案 1 :(得分:0)
Many questions are asked on multi-value sort on solr, and same problem I was also face.
I solved my problem with the help of @PrabhuVelayutham answer on this link.
He is saying.
"Create a copyfield to copy the content of multivalued data into a sorted concatenated single value without commas and use it for sorting.
For Ex :
Doc 1 :
multiValuedData : 11, 78, 45, 22
sortedConcatenatedSingleValue : 11224578
Doc 2 :
multiValuedData : 56, 74, 62, 10
sortedConcatenatedSingleValue : 10566274 "
You can go throw it and surly, you will get your result.