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 #353

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.

barbarahui commented 6 months ago

Reverting this PR to a draft because I realized that we sometimes sort on score which is presumably a solr thing. Need to update this for OpenSearch and make sure that there isn't anything else solr-specific w/r/t to sorting.

barbarahui commented 6 months ago

@amywieliczka OK, 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.

barbarahui commented 6 months ago

Closing this PR and opening a new one because this was rebased on top of the wrong branch.