You are here

public function SearchApiElasticsearchIndex::deleteItems in Search API Elasticsearch 7.2

Delete documents from Elasticsearch.

Parameters

$ids:

File

includes/SearchApiElasticsearchIndex.inc, line 140

Class

SearchApiElasticsearchIndex

Code

public function deleteItems($ids) {
  $documents = [];
  foreach ($ids as $id) {
    $documents[] = new Document($id);
  }
  $index = $this
    ->getRealIndex();
  $index
    ->deleteDocuments($documents);
}