Author: Mikael Mattsson (mikael@wallmanderco.se)
Inheritance: extends Elasticsearch\Client
 /**
  * Evaluate if the we can search for posts.
  *
  * @return bool
  */
 public static function isAvailable()
 {
     if (static::$isAvailable !== null) {
         return static::$isAvailable;
     }
     $client = new Client();
     try {
         static::$isAvailable = (bool) self::indicesExists($client->getIndexName());
     } catch (Exception $e) {
         static::$errorMessage = $e->getMessage();
         static::$isAvailable = false;
     }
     return static::$isAvailable;
 }
 public function __construct()
 {
     parent::__construct();
     $this->builderConstruct();
 }