Open achave11-ucsc opened 3 years ago
A possible solution is to offload the sorting of organism age fields to organismAgeRange
since it is the most authoritative source for age.
Note we will likely need a browser ticket so they can switch to the correct facet to sort on for organismAge.
The solution should make use of https://www.elastic.co/guide/en/elasticsearch/reference/6.8/search-request-sort.html#nested-sorting
Blocking relationship is erroneous. Implementing the ability to sort by nested fields will not facilitate aggregating them.
There are two nested objects stored in Elasticsearch that cause issues with sorting: https://service.dev.singlecell.gi.ucsc.edu/index/samples?sort=organismAgeRange
https://service.dev.singlecell.gi.ucsc.edu/index/samples?sort=assayType
There is no defined field to perform the sorting against when using these facets.
Sorting by
organismAge
is done by lexicographical order on thevalue
field only, it does not utilize theunit
field. For example, the broken behavior can exhibit 8 weeks > 7 years.https://service.azul.data.humancellatlas.org/index/files?catalog=dcp2&filters=%7B%22genusSpecies%22%3A+%7B%22is%22%3A+%5B%22Homo+sapiens%22%5D%7D%7D&sort=organismAge&order=asc&size=1000
Expected:
That the
unit
field andvalue
field are taken into consideration when performing the sort byorganismAge
.All exposed facets in the sort parameter schema should return responses without error.