Closed thomas-lcdp closed 3 months ago
My fault, bad usage of the params.
distinct must be under object meiliSearchParams and not directly under params
return getMeilisearchResults({
searchClient,
queries: [
{
indexName: defaultStoreIndex,
query,
params: {
filters: ['_tags IN [HAS_STORE, IS_PHARMLAB]'],
hitsPerPage: 3,
clickAnalytics: true,
meiliSearchParams: {
distinct: 'store.id',
},
},
},
],
Description distinct attribute passed in function getMeilisearchResults from autocomplete-client is lost when request meilisearch service.
Expected behavior distinct attribute is propagated to request
Screenshots or Logs
In generated autocomplete-client.umd.js, I added a console.log in function fetchMeilisearchResults to display the queries.
We can see in console the distinct attribute is well present.
In network, we see the request send to meilisearch service and the distinct attribute has disappear.
Environment: