filterGroups takes an object with an element per filter group where we want to define settings different from the default ones:
setting
default
values
description
order
undefined
number
Sets the order of the group in the list of filter groups. Groups without this setting are listed after the ones with it, in the same alphanumerical order as currently.
sort
alphanum
alphanum, results
Sets the order of filter values in this group. results sorts the filter values by decreasing number of results with this value.
logic
AND
AND, OR
Sets the logic between values from the same group.
I already opened multiple issues for improvements of filter groups in
PagefindUI
:567
568
594
Here's an attempt at setting these features in the
PagefindUI
initialization:filterGroups
takes an object with an element per filter group where we want to define settings different from the default ones:order
undefined
sort
alphanum
alphanum
,results
results
sorts the filter values by decreasing number of results with this value.logic
AND
AND
,OR