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

Opensearch query updates #297

Closed barbarahui closed 7 months ago

barbarahui commented 7 months ago

The main change here is adding {'track_total_hits': True} to opensearch queries. This solves the problem of getting back a hit total of 10,000 hits with a page of results. (See https://github.com/ucldc/rikolti/issues/840).

It is apparently costly to search for all matches if the total hit count is very big, so ideally we would only add this parameter when necessary, i.e. to specific queries where we need to display an accurate hit count.

The other commit builds out the list of keyword fields in our opensearch mapping, which was necessary to get various search results pages working.

amywieliczka commented 7 months ago

@barbarahui this all looks good, so I'm updating it to ready for review, approving, and merging into stage branch, which should now automagically start a build to calisphere-stage (and hopefully soon to calisphere-test).