wellcomecollection / catalogue-api

:crystal_ball: The API for searching the Wellcome Collection catalogue.
https://developers.wellcomecollection.org
MIT License
4 stars 0 forks source link

Do not return unwanted empty buckets #674

Closed paul-butcher closed 1 year ago

paul-butcher commented 1 year ago

In accordance with our faceting principles, empty buckets are only returned when a corresponding filter term results in an empty bucket. (https://github.com/wellcomecollection/catalogue-api/issues/671)

We have a way to do this in the Elasticsearch query as well (not yet implemented here, recently added to the Content API).

This change also adds consistent testing across the Works aggregations with paired filters.

I will be extending this consistency to Images in another ticket as part of https://github.com/wellcomecollection/catalogue-api/issues/666