- Issue created by @mirhamzah
- 🇩🇪Germany mkalkbrenner 🇩🇪
turn on search_api_solr_devel and check the sort parameters. Is the field missing? Or is it wrong?
- 🇬🇧United Kingdom mirhamzah
That is all good, but turning on search_api_solr_devel helped me debug in right direction.
The fields sort_X3b_en_FIELD_NAME and sort_X3b_und_FIELD_NAME had default data, not the overridden data.
Not sure if it is meant to be like that or there is a setting to override data for sorting.I had just this line before:
$document->setField('sm_FIELD_NAME', $value);
Added couple more lines for sorting and now it looks like this:
$document->setField('sm_FIELD_NAME', $value); $document->setField('sort_X3b_en_FIELD_NAME', $value); $document->setField('sort_X3b_und_FIELD_NAME', $value);
And it seems to be working fine.
Thanks :)
- 🇩🇪Germany mkalkbrenner 🇩🇪
Yes, we have language specific sort fields, because collations differ from language to language.
These sort fields are generated internally. But in you case they get filled before you replace the dummy value. At least we should document that behaviour.