deleteDocuments() public method

Uses _bulk to delete documents from the server.
public deleteDocuments ( array $docs ) : ResponseSet
$docs array Array of Elastica\Document
return Elastica\Bulk\ResponseSet
 /**
  * @param array $dataSet
  *
  * @throws \Spryker\Zed\Collector\Business\Exporter\Exception\InvalidDataSetException
  *
  * @return bool
  */
 public function delete(array $dataSet)
 {
     if ($this->hasIntegerKeys($dataSet)) {
         throw new InvalidDataSetException();
     }
     try {
         $documents = [];
         foreach ($dataSet as $key => $value) {
             $documents[] = $this->index->getType($this->type)->getDocument($key);
         }
         $response = $this->index->deleteDocuments($documents);
         $this->index->flush(true);
         return $response->isOk();
     } catch (\Exception $exception) {
         return true;
     }
 }