strapi-plugin-meilisearch
strapi-plugin-meilisearch copied to clipboard
Allow each language to go into its own index
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.
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.
@curquiza I would like to help on implementing this. I have taken a look at the code and identified several places where I could "hook" this in, but I would like to make it work according to the maintainers "style", so if you could hint me on where the best place to add this feature would be I could start a PR ?
Hey @zoran995, since you contributed a lot recently, maybe you would have insights for @tomh4 here? 🤗
An update on this would be great guys
@tomh4 Would you mind sharing what solution you came up with ?
None... I awaited a reply but as none came I accepted it as is.
It would be nice if this can be added.
Yes, especially because localization at its current state is actually broken See https://github.com/meilisearch/strapi-plugin-meilisearch/issues/988
I currently don't have the bandwidth to tackle this myself. However, everyone is welcome to open a PR for this.
We will accept and merge the first PR fixing the issue (while adhering to our contributing guidelines.) Thank you!