You are here

function search_api_solr_search_api_views_handler_mapping_alter in Search API Solr 8.2

Same name and namespace in other branches
  1. 8.3 search_api_solr.module \search_api_solr_search_api_views_handler_mapping_alter()
  2. 8 search_api_solr.module \search_api_solr_search_api_views_handler_mapping_alter()

Implements hook_search_api_views_handler_mapping_alter()

Parameters

array $mapping: An associative array with data types as the keys and Views field data definitions as the values. In addition to all normally defined data types, keys can also be "options" for any field with an options list, "entity" for general entity-typed fields or "entity:ENTITY_TYPE" (with "ENTITY_TYPE" being the machine name of an entity type) for entities of that type.

See also

_search_api_views_handler_mapping()

File

./search_api_solr.module, line 361

Code

function search_api_solr_search_api_views_handler_mapping_alter(&$mapping) {
  $mapping['solr_text_ngram'] = $mapping['solr_text_omit_norms'] = $mapping['solr_text_phonetic'] = $mapping['solr_text_suggester'] = $mapping['solr_text_unstemmed'] = $mapping['solr_text_wstoken'] = [
    'argument' => [
      'id' => 'search_api',
    ],
    'filter' => [
      'id' => 'search_api_fulltext',
    ],
    'sort' => [
      'id' => 'search_api',
    ],
  ];
  $mapping['solr_string_ngram'] = [
    'argument' => [
      'id' => 'search_api',
    ],
    'filter' => [
      'id' => 'search_api_string',
    ],
    'sort' => [
      'id' => 'search_api',
    ],
  ];
}