Restrict custom ranking for multilingual index: is it possible?

Hi everyone!

I’m trying to create a unique index for multiple languages, as explained in the Algolia documentation.
For example, I will have some locations, and their name in many languages, e.g.
name_en="Dubai" and then name_ar="دبي".

Until now, we had 2 different indices for each language, but due to too many duplicate fields, we decided to merge them. We used to have a custom ranking which was name-based, but now since we have different names in different languages, that won’t work anymore, which means that we can have our results properly sorted either in one language, or the other, but not both.

I was wondering if there is anything similar to restrictSearchableAttributes that I could use at runtime to decide which custom ranking to use or to ignore?

As a side note: does restrictSearchableAttributes truly works? I’ve tried using it on the above example, but I’m always getting the exact same results with or without it. Am I missing something here?

Thank you!

Hi again,

Just wanted to pipe in and say that so far, I haven’t managed to find anything that might fill my needs, since it seems that different types of sorting should always be done on replicas.

I’m guessing what I want is just not possible?

If so, what would be the difference between having a replica, and just having a new index?