cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict Solr response fields set to current locale

Former Member
0 Kudos

I have a store that supports multiple locales. And when I index products, all fields are multiplied by amount of locales. It leads to very big size of solr response (~1mb per record) Is it possible to create a filter, that will return only fields for current locale. Ex. instead of

        "autosuggest":["0430 0100"],
         "autosuggest_de":["0430 0100"],
         "autosuggest_en":["0430 0100"],
         "autosuggest_es":["0430 0100"],
         "autosuggest_fr":["0430 0100"],
         "autosuggest_zh_tw":["0430 0100"],
         "autosuggest_cz_cz":["0430 0100"],
         "autosuggest_de_at":["0430 0100"],
         "autosuggest_de_be":["0430 0100"],
         "autosuggest_de_ch":["0430 0100"],
         "autosuggest_de_de":["0430 0100"],
         "autosuggest_en_au":["0430 0100"],
         "autosuggest_en_cn":["0430 0100"],
         "autosuggest_en_in":["0430 0100"],
         "autosuggest_en_uk":["0430 0100",

Return only

   "autosuggest":["0430 0100"],
         "autosuggest_de":["0430 0100"],
         "autosuggest_de_de":["0430 0100"],

If request locale is de_de.

Maybe it's possible to calculate FL field list, but I'm looking for more clear solution on solr side.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I think it should work out of the box but you need to check restrict fields in response flag on the query template or I think on indexed type if not using templates. Ultimately you need to use non legacy search mode. Locales should be filtered out then.

Answers (0)