ucldc / public_interface

Calisphere public interface source code (UCLDC Project) master branch should match live site
https://calisphere.org/
2 stars 5 forks source link

Add results sorting for OpenSearch queries #359

Closed barbarahui closed 6 months ago

barbarahui commented 6 months ago

This PR implements sorting search results for OpenSearch queries. Other than needing to change score to _score, I think all of the fields we sort on exist in the new index and are mapped as type keyword.

It looks like sorting by sort_date_start and sort_date_end works for the ETL'ed collections that have this field, fwiw. Of course it does nothing for non-ETLed collections right now.

@amywieliczka This is ready for review. I think I checked all of the relevant places where sorting is used, but please let me know if you can think of any gotchas.