Best practices for multi-lingual indexes #650
Replies: 3 comments
-
Hello @tacman, Meilisearch automatically detects the language used in each field, so you can have several languages in the same document. Unless you mix Chinese and Japanese, if it's easier to put everything in the same index you can do it without issues. |
Beta Was this translation helpful? Give feedback.
-
Is there guidance on how to best support localized content? Currently I'm leaning towards an index per locale (eg |
Beta Was this translation helpful? Give feedback.
-
I went through a similar process, and in the end decided on a _translations
key in the record, keyed by language and under that the fields that were
translatable.
The next version of MeiliSearch will support searching by individual
fields, which will prevent the false hits that can happen now.
There's a discussion in the MeiliSearch chat on this as well.
![image](https://github.com/meilisearch/product/assets/619585/22d8ef3e-f4eb-42bf-8952-28cc991d799f)
|
Beta Was this translation helpful? Give feedback.
-
We use machine translation for the 'label' and 'description' properties. We have lots of other fields that are numeric or codes for lookups.
What is the best structure to use for the index? One index per language (duplicating the numeric fields)? A language index for just the label and description properties, then use some sort of federated search for the rest of the properties? Or put the language in as array keys, e.g.
And this might be pretty basic, but how do I set a language within an index (or document or field)? Gracias.
Beta Was this translation helpful? Give feedback.
All reactions