meilisearch / strapi-plugin-meilisearch

A strapi plugin to add your collections to Meilisearch
https://meilisearch.com
MIT License
223 stars 58 forks source link

Allow each language to go into its own index #934

Open davidwebster48 opened 5 months ago

davidwebster48 commented 5 months ago

My content is available in many languages, using Strapi's i18n plugin.

According to the Meilisearch docs, it is advised to "split your dataset—one language per index".

However, I don't think this is possible using the Meilisearch Strapi plugin. According to this comment it wasn't possible last year, and I can't see anything in the docs about how to do this.

Here is my suggestion for how this could be configured...

// config/plugins.js

module.exports = () => ({
  //...
  meilisearch: {
    config: {
      restaurant: {
        indexName: "my_restaurants",
        oneIndexPerLocale: true,
      }
    }
  }
})

This would automatically create one index per locale, and append the locale code to the index name, so you'd get indexes like my_restaurants-en, my_restaurants-es, my_restaurants-pl, etc.

BenCherif commented 4 months ago

We have been waiting for this feature for a long time. We hope the team will implement it as soon as possible. Thanks @davidwebster48 for mentioning this enhancement.