Using one or multiple indices to handle multi-language search
Depending on your use case, you can use either one index for each language or one for all languages. Use multiple indices, one for each language, if:- You need a custom ranking per language/country. For example, you want to sort by price, and there are different pricing structures in different countries.
- You want to support many languages.
One index per language
This approach simplifies:- Index configuration
- Per-language analytics (otherwise, you need to use
analyticsTags
) - Creation of per-language query suggestions.
JSON
JSON
JSON
One index for all records
Before deciding on this approach, check that all the text you require from your list of supported languages will be within
Algolia’s record size limits. If they do exceed the limit, use one index per language.
JSON
searchableAttributes
.
JavaScript