algoliasearch-helper-js
algoliasearch-helper-js copied to clipboard
[advanced facets] Adding info about facet count approximation
When we use advanced facets (disjunctive or hierarchical), we have a multiple part problem:
- facet count can come from the main or the sub response, and they can be approximated. The algolia api can send us back informations about the approximation. But this information is not merged properly (we only take the info from the main response)
- the approximation information might be different between the subs and main responses. We should have a pesimistic approach here, and consider aproximate if at least one of the answer is approximated
- the approximation data should be easily available for our users. For example, when using
getFacetValues
, or have a new methodisFacetCountExhaustive(facetName)