You are here

public function SearchApiElasticsearchConnector::getIndexName in Elasticsearch Connector 7

Same name and namespace in other branches
  1. 7.5 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::getIndexName()
  2. 7.2 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::getIndexName()

Helper function. Returns the elasticsearch name of an index.

2 calls to SearchApiElasticsearchConnector::getIndexName()
SearchApiElasticsearchConnector::addIndex in modules/elasticsearch_connector_search_api/service.inc
Overrides addIndex().
SearchApiElasticsearchConnector::getIndexParam in modules/elasticsearch_connector_search_api/service.inc
Helper function to return the index param.

File

modules/elasticsearch_connector_search_api/service.inc, line 999
Provides a Elasticsearch-based service class for the Search API using Elasticsearch Connector module.

Class

SearchApiElasticsearchConnector
Search service class.

Code

public function getIndexName(SearchApiIndex $index) {
  global $databases;
  $site_database = $databases['default']['default']['database'];
  return !empty($index->options['index_name']['index']) ? $index->options['index_name']['index'] : $site_database;
}