You are here

protected function SearchApiElasticsearchBackend::getIndexParam in Elasticsearch Connector 8

Helper function to return the index param.

Parameters

IndexInterface $index:

Return value

array

6 calls to SearchApiElasticsearchBackend::getIndexParam()
SearchApiElasticsearchBackend::deleteItemsIds in src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php
Helper function for bulk delete operation.
SearchApiElasticsearchBackend::fieldsUpdated in src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php
Overrides fieldsUpdated().
SearchApiElasticsearchBackend::getElasticsearchTypeExists in src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php
Helper function, check if the type exists.
SearchApiElasticsearchBackend::indexItems in src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php
Overrides indexItems().
SearchApiElasticsearchBackend::removeIndex in src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php
Overrides removeIndex().

... See full list

File

src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php, line 424
Contains the SearchApiElasticsearchBackend object.

Class

SearchApiElasticsearchBackend
Plugin annotation @SearchApiBackend( id = "elasticsearch", label = @Translation("Elasticsearch"), description = @Translation("Index items using an Elasticsearch server.") )

Namespace

Drupal\elasticsearch_connector\Plugin\search_api\backend

Code

protected function getIndexParam(IndexInterface $index, $with_type = FALSE) {
  $index_name = $this
    ->getIndexName($index);
  $params = array();
  $params['index'] = $index_name;
  if ($with_type) {
    $params['type'] = $index
      ->id();
  }
  return $params;
}