You are here

public function SearchApiElasticsearchIndex::create in Search API Elasticsearch 7.2

Create Elasticsearch a new index.

File

includes/SearchApiElasticsearchIndex.inc, line 71

Class

SearchApiElasticsearchIndex

Code

public function create() {
  $index = $this
    ->getRealIndex();
  $index
    ->create($this->search_api_index->options['search_api_elasticsearch'] ?: [], TRUE);
  $index
    ->addAlias($this->search_api_index->machine_name);
}