public function SearchApiElasticsearchConnector::getElasticsearchIndexSettings in Elasticsearch Connector 7.5
Same name and namespace in other branches
- 7.2 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::getElasticsearchIndexSettings()
Get the index settings of an Elasticsearch index.
Parameters
$index:
Return value
mixed
1 call to SearchApiElasticsearchConnector::getElasticsearchIndexSettings()
- SearchApiElasticsearchConnector::deleteItems in modules/
elasticsearch_connector_search_api/ service.inc - Overrides deleteItems().
File
- modules/
elasticsearch_connector_search_api/ service.inc, line 501 - Provides a Elasticsearch-based service class for the Search API using Elasticsearch Connector module.
Class
- SearchApiElasticsearchConnector
- Search service class.
Code
public function getElasticsearchIndexSettings($index) {
try {
$indexName = $this
->getIndexName($index);
$params = $this
->getIndexParam($index);
$settings = $this->elasticsearchClient
->indices()
->getSettings($params);
return $settings[$indexName]['settings'];
} catch (Exception $e) {
drupal_set_message($e
->getMessage(), 'error');
}
}