function search_api_solr_update_8319 in Search API Solr 8.3
Same name and namespace in other branches
- 4.x search_api_solr.install \search_api_solr_update_8319()
Fix Solr 6 Czech Field Type and improve spellcheckers.
File
- ./
search_api_solr.install, line 1453 - Install, update and uninstall functions for the Search API Solr module.
Code
function search_api_solr_update_8319() {
foreach (search_api_solr_update_helper_get_field_type_configs() as $field_type_name => $field_type_config) {
$save = FALSE;
if (!empty($field_type_config['field_type'])) {
$save = FALSE;
foreach ($field_type_config['field_type'] as &$components) {
if (is_array($components)) {
foreach ($components as &$analyzers) {
if (is_array($analyzers)) {
foreach ($analyzers['filters'] as $key => &$filter) {
if ('solr.RemoveDuplicatesTokenFilterFactor' === $filter['class']) {
$filter['class'] = 'solr.RemoveDuplicatesTokenFilterFactory';
$save = TRUE;
}
}
}
}
}
}
}
if ($save) {
search_api_solr_update_helper_save_field_type_config($field_type_name, $field_type_config);
}
}
}