The search API stores facets with a key and the URL is usually something like
?f[0]="facet_0&f[1]="facet_1"&f[2]="facet_2"
Unfortunately, this array is rebuilt on each page load and the order is not preserved. I need to know the order the user selected the facets.
I am thinking about trying to ensure this filter array preserves the order but I might have to instead add a new key called ‘facet_order’ that does this if I can’t modify the original filter key.
I have not been able to find a way to do either of these though. Is there a form alter or preprocess function that would allow me to change this behavior?