Smile\ElasticsuiteCore\Indexer\GenericIndexerHandler::deleteIndex PHP Method

deleteIndex() public method

{@inheritDoc}
public deleteIndex ( $dimensions, Traversable $documents )
$documents Traversable
    public function deleteIndex($dimensions, \Traversable $documents)
    {
        foreach ($dimensions as $dimension) {
            $storeId = $dimension->getValue();
            $index = $this->indexOperation->getIndexByName($this->indexName, $storeId);
            $type = $index->getType($this->typeName);
            foreach ($this->batch->getItems($documents, $this->batchSize) as $batchDocuments) {
                $bulk = $this->indexOperation->createBulk()->deleteDocuments($index, $type, $batchDocuments);
                $this->indexOperation->executeBulk($bulk);
            }
            $this->indexOperation->refreshIndex($index);
        }
        return $this;
    }