Check if the index exists or not Elasticsearch
This will return true or false:
$params = ['index' => 'products'];
$bool=$client->indices()->exists($params);
As per index operations and source code the following should work
$client = new Elasticsearch\Client();
$indexParams['index'] = 'my_index';
$client->indices()->exists($indexParams);