different facet counts between algoliasearch-helper 3.22.5 and 3.22.6 #6482
-
a recent change between with 3.22.5 i see: with 3.22.6 i see: AFAICT the counts in 3.22.5 are taken from the extra facet query (where no facet filter is applied), i.e. they display how many documents have e.g. "Kämmerer" in the list of values. in 3.22.6 however, the counts are taken from the main query, i.e. they represent not how many documents have "Kämmerer", but how many documents have "Kämmerer" AND any currently selected/refined values - and these values differ rather substantially (1702 vs. 174). can you elaborate why this was changed? thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
You're right that this change will be related to the change made in #6445, and was intentional. I'll now look into where this discrepancy is coming from in your case. Are both queries exhaustive? It's odd that all numbers are the same except those two. I wonder if the logic should be tweaked to prefer the facets which are set as exhaustive if only one of the two have that; or otherwise taking the largest number. Is this reproducible with all facets or just one? Do you have a reproduction (can be a curl or just the |
Beta Was this translation helpful? Give feedback.
#6536 should fix your use case. Thanks for bringing it up.
Your second question I can't really help with, that's an engine feature request as we can't force values to be in the response. A workaround can be to put an artificially high
maxValuesPerFacet
in a configure widget. This will make your response slightly larger, but makes it more likely for the facet to be present in the response.