You are here

protected function AbstractSearchApiSolrMultilingualBackend::getLanguageSpecificSolrFieldNames in Search API Multilingual Solr Search 8

Gets a language-specific mapping from Drupal to Solr field names.

Parameters

string $langcode: The lanaguage to get the mapping for.

array $solr_fields: The mapping from Drupal to Solr field names.

\Drupal\search_api\IndexInterface $index_fields: The fields handled by the curent index.

Return value

array The language-specific mapping from Drupal to Solr field names.

3 calls to AbstractSearchApiSolrMultilingualBackend::getLanguageSpecificSolrFieldNames()
AbstractSearchApiSolrMultilingualBackend::getAutocompleteFields in src/Plugin/search_api/backend/AbstractSearchApiSolrMultilingualBackend.php
AbstractSearchApiSolrMultilingualBackend::getFilterQueries in src/Plugin/search_api/backend/AbstractSearchApiSolrMultilingualBackend.php
AbstractSearchApiSolrMultilingualBackend::setFacets in src/Plugin/search_api/backend/AbstractSearchApiSolrMultilingualBackend.php

File

src/Plugin/search_api/backend/AbstractSearchApiSolrMultilingualBackend.php, line 305

Class

AbstractSearchApiSolrMultilingualBackend
A abstract base class for all multilingual Solr Search API backends.

Namespace

Drupal\search_api_solr_multilingual\Plugin\search_api\backend

Code

protected function getLanguageSpecificSolrFieldNames($lancgcode, array $solr_fields, IndexInterface $index) {

  // @todo Caching.
  foreach ($index
    ->getFulltextFields() as $fulltext_field) {
    $solr_fields[$fulltext_field] = SearchApiSolrUtility::encodeSolrName(Utility::getLanguageSpecificSolrDynamicFieldNameForSolrDynamicFieldName($solr_fields[$fulltext_field], $lancgcode));
  }
  return $solr_fields;
}