/** * Drop all indexes in the collection. * * @see DropIndexes::__construct() for supported options * * @param array $options Additional options * * @return array|object Command result document */ public function dropIndexes(array $options = []) { if (!isset($options['typeMap'])) { $options['typeMap'] = $this->typeMap; } $operation = new DropIndexes($this->databaseName, $this->collectionName, '*', $options); $server = $this->manager->selectServer(new ReadPreference(ReadPreference::RP_PRIMARY)); return $operation->execute($server); }