function search_api_solr_update_8314 in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 search_api_solr.install \search_api_solr_update_8314()
Enable language-unspecific collation.
File
- ./
search_api_solr.install, line 1269 - Install, update and uninstall functions for the Search API Solr module.
Code
function search_api_solr_update_8314() {
foreach (search_api_solr_update_helper_get_field_type_configs() as $field_type_name => $field_type_config) {
if (empty($field_type_config['collated_field_type']) && !empty($field_type_config['spellcheck_field_type']) && LanguageInterface::LANGCODE_NOT_SPECIFIED == $field_type_config['field_type_language_code']) {
$field_type_config['collated_field_type'] = [
'name' => 'collated_' . $field_type_config['field_type_language_code'],
'class' => 'solr.ICUCollationField',
'locale' => 'en',
'strength' => 'primary',
'caseLevel' => FALSE,
];
search_api_solr_update_helper_save_field_type_config($field_type_name, $field_type_config);
}
}
}