existsStatement() public method

Execute a exists statement on index.
public existsStatement ( array $params ) : array | boolean
$params array
return array | boolean
 /**
  * Delete a model document.
  *
  * @return mixed
  */
 public function delete()
 {
     $this->exitIfModelNotSet();
     $params = ['id' => $this->model->getKey(), 'type' => $this->model->getDocumentType(), 'index' => $this->model->getDocumentIndex()];
     // check if the document exists before deleting
     if ($this->connection->existsStatement($params)) {
         return $this->connection->deleteStatement($params);
     }
     return true;
 }