Get all values for an attribute

Hi,

I want to create a custom RefinementList, probably using the connector for that. But I want to display EVERY possible values for my attribute. My attribute is a “category.name”, I know I only have a small amount, and I want our users to see ALL categories we have.

Can I do that with react-instantsearch, or do I have to use directly instant search for that?

Thanks for your help!

Hi @nicolas.challeil :wave:

You can set a limit of your facets using the limit property like in the following example:

That said, Algolia limits the response to a maximum of 1000 facets:

https://www.algolia.com/doc/guides/searching/faceting/#increasing-the-default-limit

If you’re going to have more that 1000 facets values probably an alternative strategy would be probably to index the categories in a separate index and list that to your users; you can use that to build a custom refine list component in React-InstantSearch and be able to pass down a custom refinement for each value.

Let me know if this works out in your case!

Thanks @gianluca.bargelli, but I also want the list to stay the same when the user types something.