CloudCannon / pagefind

Static low-bandwidth search at scale
https://pagefind.app
MIT License
3.22k stars 97 forks source link

Allow setting the `OR` logic for filter values inside a filter group #594

Open nhoizey opened 2 months ago

nhoizey commented 2 months ago

“Currently, the Default UI treats all filters as AND filters, meaning pages will only be shown if they match all toggled filters”: https://pagefind.app/docs/default-ui-filtering/

I would like to be able to select multiple filter values from a same filter group with an OR logic, having the AND logic still applied between filter groups.

For example, I would like to select (in pseudo code) pageType(Gear OR Gallery) AND location(America OR Africa).

The best would be to be able to define the logic for each filter group independently.

tenmozes commented 2 months ago

@bglw what do you think about providing the option to change from all to any for filter on global level for PageFind UI?