public function removeMultipleFromIndices(array $searchableModels)
    {
        $algoliaRecords = $this->getAlgoliaRecordsFromSearchableModelArray($searchableModels);
        $indices = $this->initIndices($searchableModels[0]);
        $objectIds = \array_map(function ($algoliaRecord) {
            return $algoliaRecord['objectID'];
        }, $algoliaRecords);

        return $this->processIndices($indices, function (Index $index) use ($objectIds) {
            return $index->deleteObjects($objectIds);
        });
    }
public function removeMultipleFromIndices(array $searchableModels)
    {
        $algoliaRecords = $this->getAlgoliaRecordsFromSearchableModelArray($searchableModels);
        $indices = $this->initIndices($searchableModels[0]);
        $objectIds = \array_map(function ($algoliaRecord) {
            return $algoliaRecord['objectID'];
        }, $algoliaRecords);

        return $this->processIndices($indices, function (Index $index) use ($objectIds) {
            return $index->deleteObjects($objectIds);
        });
    }
public function removeMultipleFromIndices ( array $ searchableModels ) { $ algoliaRecords = $ this -> getAlgoliaRecordsFromSearchableModelArray ( $ searchableModels ) ; $ indices = $ this -> initIndices ( $ searchableModels [ 0 ] ) ; $ objectIds = \ array_map ( function ( $ algoliaRecord ) { return $ algoliaRecord [ 'objectID' ] ; } , $ algoliaRecords ) ; return $ this -> processIndices ( $ indices , function ( Index $ index ) use ( $ objectIds ) { return $ index -> deleteObjects ( $ objectIds ) ; } ) ; }
Removes multiple models from all indices. The given searchable models must be of the same class.

@param array $searchableModels

@return array
@throws \InvalidArgumentException
Removes multiple models from all indices . The given searchable models must be of the same class .