Setup function fail when it tries if indices exist with exception
Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in
/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:51
If I do drush eshd to drop index and then try drush eshs to setup index with new mapping I get this error.
I'v tried to figure out what is happening but can't really find out what is wrong.
I'm connected to Amazon ES.
If I test the same code locally to my local hosted Elastic search server it works.
Comments
Comment #2
dajjenThe code in the example of MultilingualContentIndex in the elasticsearch_helper_example have a setup function that is first checking if indices exist before creating a new one.
This code was I'm using in my custom module that is using Amazon ES.
for some reason this check doesn't work.
I will continue research this and see why this is not working.
A workaround for now is to remove this check before $this->client->indices()->create(...).
But be aware of that this will try to create indices even though there is one already with that name. In my case i'm not calling setup without calling delete first.