Facets summary reset link still having issues

Created on 25 April 2023, about 1 year ago

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.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡·πŸ‡ΈSerbia arpad.rozsa

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024