- Issue created by @arpad.rozsa
Even after the changes in
#3341222
🐛
Facets summary reset link does not work
Fixed
, I have issues with the reset link.
I have a range input facet configured for a date field and e.g. if I search for the year range 1979-1982, the results are correctly found, but the reset link contains all years that are indexed. So if I have data from 1955 it will show up as a reset link even if the search works properly.
The other issue is that the reset link contains the URL placeholder (min:__range_input_min__,max:__range_input_max__)
whereas it should not have the range facet at all as it is the one that should be reset.
Reviewing the commits in the previous issue, seems like the first problem is caused by the postQuery()
method in the processor, because it goes through the min and max values from the results. I think it would be better to use the values from the active items and maybe even reduce the generated results to one, because from the range input you can't just remove a single value. So in my example I wouldn't be able to remove the year 1980, so I would format the reset link to show 1979 - 1982
or something similar and have that one link remove the whole range facet from the URL.
Active
2.0
Code