meilisearch / meilisearch-js-plugins

The search client to use Meilisearch with InstantSearch.

Home Page:https://www.meilisearch.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong facet count with many facets

martin-ro opened this issue · comments

Description
When there are many facet values (let's say tags) and you add a refinementList widget the result count for the facets is off. I first thought exhaustiveFacetsCount might be the way to go but this has been removed.

I also tried to limit the refinementList facet values but the count would be still wrong. Only when I reduced the indexed facet values to ~25 the count started to be correct again.

I've read that in instantsearch this there are a few ways to handle this:

  • exhaustiveFacetsCount config
  • maxValuesPerFacet config
  • A calculation/estimation (read somewhere in the docs the just multiply by 3 for the estimation)

Expected behavior
Either configurable exhaustiveFacetsCount or a better estimation of the count like.

Current behavior
Only a fraction of results is counted when there is an extensive list of facets

Environment (please complete the following information):

  • Meilisearch version: v1.5.1
  • instant-meilisearch version: ^0.14.0
  • instantsearch.js version: ^4.63.0

Hello @martin-ro

I'm not sure this issue is related to this library but more related to the Meilisearch behavior itself.

Can you detail what you want to do exactly? What you get and what you would expect?

Maybe do you want to increase the number of value per facet? Default is 100
https://www.meilisearch.com/docs/reference/api/settings#faceting-object

Also, since we cannot be really reactive for the support on this repo, please feel free to reach our Discord to get more help and support