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

Improve filtering when filter query string parameters are empty. #647

Open paul-butcher opened 1 year ago

paul-butcher commented 1 year ago

The behaviour for filter parameters is as follows:

These above behaviours are pretty intuitive. However, one more possible option exists which is not so intuitive:

I discovered this when implementing genre filters. For genre filters, I set it so that the filter is not applied if present but empty. However, that is not the only valid option. Another could be to return results that do not have any value set in that field.

So we should change the empty filter behaviour on all filters to either: