protected function SearchApiElasticsearchConnector::getClusterVersion in Elasticsearch Connector 7
Same name and namespace in other branches
- 7.5 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::getClusterVersion()
- 7.2 modules/elasticsearch_connector_search_api/service.inc \SearchApiElasticsearchConnector::getClusterVersion()
Get the Elasticsearch server version.
Return value
string
3 calls to SearchApiElasticsearchConnector::getClusterVersion()
- SearchApiElasticsearchConnector::deleteItems in modules/
elasticsearch_connector_search_api/ service.inc - Overrides deleteItems().
- SearchApiElasticsearchConnector::handleMLTSearch in modules/
elasticsearch_connector_search_api/ service.inc - Handle the "More like this" functionality if it is required.
- SearchApiElasticsearchConnector::removeIndex in modules/
elasticsearch_connector_search_api/ service.inc - Overrides removeIndex().
File
- modules/
elasticsearch_connector_search_api/ service.inc, line 1138 - Provides a Elasticsearch-based service class for the Search API using Elasticsearch Connector module.
Class
- SearchApiElasticsearchConnector
- Search service class.
Code
protected function getClusterVersion() {
static $version;
if (!isset($version)) {
try {
$info = $this->elasticsearchClient
->info();
$version = $info['version']['number'];
} catch (Exception $e) {
watchdog('Elasticsearch Search API', check_plain($e
->getMessage()), array(), WATCHDOG_ERROR);
}
}
return $version;
}