ElasticSearch Sorting on localized fields

587 Views Asked by At

We are using ElasticSearch for storing the user profile data and one of the field is roleId. There are more than 100 roles are possible in application and a user can have multiple roles and every role has localized texts for different different languages.

We have an web application which access the user profile form elastic search and there user role needs to be displayed in localized text for example if client locale[browser] is french then corresponding french localized text for roleId[ Assuming 101 is the role Id for the Manager] needs to be displayed.

Now the problem is 1. How to store the localized text for such kind of scenario. If we store it with original document then probably we are repeating the text too many and consuming too many space. 2. We need sorting on the localized field.Is there any way to sort on localized field.

Please consider above scenario for providing any suggestion.

0

There are 0 best solutions below