Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alex-bukach/aabe261f5458a6ba6130f1299c3ffb40 to your computer and use it in GitHub Desktop.
Save alex-bukach/aabe261f5458a6ba6130f1299c3ffb40 to your computer and use it in GitHub Desktop.
diff --git a/modules/elasticsearch_connector_search_api/service.inc b/modules/elasticsearch_connector_search_api/service.inc
index 53ab927..5fb13c0 100644
--- a/modules/elasticsearch_connector_search_api/service.inc
+++ b/modules/elasticsearch_connector_search_api/service.inc
@@ -61,6 +61,9 @@ class SearchApiElasticsearchConnector extends SearchApiAbstractService {
if ($this->cluster_id) {
$this->elasticsearchClient = elasticsearch_connector_get_client_by_id($this->cluster_id);
}
+ if (!$this->elasticsearchClient) {
+ $this->elasticsearchClient = new \Elasticsearch\Client();
+ }
}
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment