On 9/28/2021 9:52 PM, sambasivarao giddaluri wrote:
Below is documents where we have display field as array where sometimes it
has single value and sometime multivalue field . We want to sort on display
but getting error "can not sort on multivalued field" . Thought of creating
a copy field as string but this will cause issue when multivalue fields
comes.

For copyField, if the source is multiValued, then the destination must be multiValued. If the source ever has more than one value and the destination isn't multiValued, indexing will fail.

Solr cannot sort on a multiValued field. It's just not possible. If you try, you get that error. To be able to use the data for sorting, you will need to provide a field that is not multiValued and have whatever you are using for indexing place the correct value in that field.

Thanks,
Shawn

Reply via email to