/**
  * Removes a single document data by ID.
  *
  * @param string $id Document ID to remove.
  *
  * @return array
  *
  * @throws \LogicException
  */
 public function remove($id)
 {
     $params = ['index' => $this->getManager()->getWriteAlias(), 'type' => $this->metadata->getType(), 'id' => $id];
     $response = $this->getManager()->getConnection()->getClient()->delete($params);
     return $response;
 }
 /**
  * Sets the metadata for a combination of a real/physical index name and a type
  *
  * @param DocumentMetadata $documentMetadata
  * @param string           $realIndex        The physical index name
  */
 public function setTypeMetadata(DocumentMetadata $documentMetadata, $realIndex = null)
 {
     $this->metadata[$realIndex ?: '*'][$documentMetadata->getType()] = $documentMetadata;
 }