Support multiple languages in search

Hey guys,

was wondering what the best way to support multiple languages in search is.

Let’s say I have a firestore db with fields like name, name_de, name_fr etc.

So far I could only come up with two options:

  1. Copy those fields, make them all searchable on Algolia (might hit the limit on searchable attributes pretty fast if there is one or make the search response less relevant) and search through all of them all the time.

  2. Creating a new index (duplicate data) for every language where all the fields are the same compared to other indexes except for the strings which are saved in different languages in each index and then based on what language my user has currently chosen change the index i am searching over.

Any tips or other approaches?

Hi @Sascha,

I’m not sure about searching on a single index with all the languages at once: it might have a bad relevancy. Then you could duplicate (or better even use replicas) with different configuration for each language. One index being one index. But this can be cumbersome in your front-end as you will have different language support hardcoded.

In my opinion, the best is to have one index per language and make them all share the same structure so that you can reuse the same front-end search in all languages.

1 Like