CDRH / api

Codenamed "Apium": An API to access all public Center for Digital Research in the Humanities resources
https://cdrhdev1.unl.edu/api_frontend
MIT License
3 stars 1 forks source link

adds multivalued and nested support to sorting #90

Closed jduss4 closed 5 years ago

jduss4 commented 5 years ago

nested fields can now be sorted (eg: creator.name) multivalued fields sorting: if sort ascending use min value, if sort descending use max value in field missing fields for specified sort always sorted last

Reference used: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html

Tested against Whitman development index with nested, multivalued field, and with field which contains both multiple values (array) and single values in it to make sure sort was working in a reliable way

Closes https://github.com/CDRH/api/issues/34 unless if there are further concerns about automatically sorting nested fields by min / max