In 5, we allow multi-valued sort fields at indexing time, because we don’t know those fields will be multi-valued. But we don’t have any way to sort on such fields.
We need to either: * Force bridge implementors Inspect metadata at query time to declare prevent sorts on multi-valued fields in advance, so that we can prevent multiple values to be indexed in a sort field and throw an explicit exception. * OR provide ways to sort on multi-valued fields: allow to specify “sort on the max for each document” or similar.
For reference: * Solr forces users to declare multi-valued fields in the schema * Elasticsearch does not * Both allow to sort on multi-valued fields (Solr since 5.3: https://lucidworks.com/2015/09/10/minmax-on-multivalued-field/) |
|