I am trying to do refinement in meilisearch.
const search = instantsearch({
indexName: "books",
searchClient: instantMeiliSearch(
"https://example.com",
"XXXXXXXXXXX",
),
searchParameters: {
attributesForFaceting: ['title']
}
});
instantsearch.widgets.refinementList({
container: '#brand-list',
attribute: 'title',
}),
I am keep getting error 'Can't perform facet count, as no facet is set'. I do not know what I am doing wrong, any help would be great.
Thanks in advance.
You must add attributesForFacetting to the settings to be able to perform a search with facet filters. Check the dedicated section of the documentation: https://docs.meilisearch.com/reference/features/faceted_search.html#setting-up-facets