public function createMangoIndex($fields, $ddoc = null, $name = null)
  {
      $documentPath = '/'.$this->databaseName.'/_index';

      $params = ['index'=>['fields'=>$fields]];

      if ($ddoc) {
          $params['ddoc'] = $ddoc;
      }
      if ($name) {
          $params['name'] = $name;
      }

      return $this->httpClient->request('POST', $documentPath, json_encode($params));
  }