You are here

public function SearchApiElasticsearchConnector::getIndexName in Elasticsearch Connector 7.5

Same name and namespace in other branches
  1. 7 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.

3 calls to SearchApiElasticsearchConnector::getIndexName()
SearchApiElasticsearchConnector::addIndex in modules/elasticsearch_connector_search_api/service.inc
Overrides addIndex().
SearchApiElasticsearchConnector::getElasticsearchIndexSettings in modules/elasticsearch_connector_search_api/service.inc
Get the index settings of an Elasticsearch index.
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 1079
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;
}