public static function Utility::getSolrDynamicFieldNameForLanguageSpecificSolrDynamicFieldName in Search API Solr 4.x
Same name and namespace in other branches
- 8.3 src/Utility/Utility.php \Drupal\search_api_solr\Utility\Utility::getSolrDynamicFieldNameForLanguageSpecificSolrDynamicFieldName()
- 8.2 src/Utility/Utility.php \Drupal\search_api_solr\Utility\Utility::getSolrDynamicFieldNameForLanguageSpecificSolrDynamicFieldName()
Maps a language-specific Solr field name to its unspecific equivalent.
For example the dynamic field tm;en_* for English will become tm_*.
Parameters
string $field_name: The field name.
Return value
string The language-unspecific field name.
See also
\Drupal\search_api_solr\Utility\Utility::encodeSolrName()
https://wiki.apache.org/solr/SchemaXml#Dynamic_fields
File
- src/
Utility/ Utility.php, line 372
Class
- Utility
- Provides various helper functions for Solr backends.
Namespace
Drupal\search_api_solr\UtilityCode
public static function getSolrDynamicFieldNameForLanguageSpecificSolrDynamicFieldName($field_name) {
return Utility::modifySolrDynamicFieldName($field_name, '@^([a-z]+)' . SolrBackendInterface::SEARCH_API_SOLR_LANGUAGE_SEPARATOR . '[^_]+?_@', '$1_');
}