You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the location Canada is not in the first 6 most popular facet results for this query, it is not included in info.facets.location. Only the 6 most populars are accessible. However, I can see we retrieve this data from the request that is not Facet-Only (since it returns only the two facets that we used to filter).
If we use the facets results to display checkboxes (with multiple selection active), it is a problem since the Canada option will not be shown, and then cannot be remove from the filters. We need to "cache" that selected value, and then display it without it's count.
I don't know if this should be implemented at a endpoint level, but I think the active filters should be returned as the first values when retrieving facet values, so that the UI can be implemented out-of-the-box. Even if they are empty (count = 0). That way, it will be easier to implement a UI based on them.
The text was updated successfully, but these errors were encountered:
I agree, this is a good feature suggestion. And yes, I think it should definitely be at the endpoint level. In the meantime, I would recommend fetching a much larger "size" and implement that sort yourself.
Thanks. That's what I'll do for the moment. It's unfortunately still a issue for selected facets with no results, since they are not returned even if the size is large. I will just cache that for now. Curious on how bad the impact on performance couldl be for a size > 100 (meaning I query for litteraly all facet values)?
Let's say we are using the facet with the following
options
:If the location
Canada
is not in the first 6 most popular facet results for this query, it is not included ininfo.facets.location
. Only the 6 most populars are accessible. However, I can see we retrieve this data from the request that is notFacet-Only
(since it returns only the two facets that we used to filter).If we use the facets results to display checkboxes (with multiple selection active), it is a problem since the Canada option will not be shown, and then cannot be remove from the filters. We need to "cache" that selected value, and then display it without it's count.
I don't know if this should be implemented at a endpoint level, but I think the active filters should be returned as the first values when retrieving facet values, so that the UI can be implemented out-of-the-box. Even if they are empty (count = 0). That way, it will be easier to implement a UI based on them.
The text was updated successfully, but these errors were encountered: