You are here

static function SearchApiElasticsearchIndex::setCurrentIndexName in Search API Elasticsearch 7.2

Map Elasticsearch alias to index for Drupal.

Parameters

SearchApiIndex $index:

1 call to SearchApiElasticsearchIndex::setCurrentIndexName()
search_api_elasticsearch_entity_presave in ./search_api_elasticsearch.module
Implements hook_entity_presave().

File

includes/SearchApiElasticsearchIndex.inc, line 291

Class

SearchApiElasticsearchIndex

Code

static function setCurrentIndexName(SearchApiIndex $index) {
  $index->options['search_api_elasticsearch']['current_index'] = $index->machine_name . '_' . REQUEST_TIME;
}