lib/Doctrine/ODM/MongoDB/SchemaManager.php
public function updateIndexes($timeout = null)
    {
        foreach ($this->metadataFactory->getAllMetadata() as $class) {
            if ($class->isMappedSuperclass || $class->isEmbeddedDocument) {
                continue;
            }
            $this->updateDocumentIndexes($class->name, $timeout);
        }
    }
public function updateIndexes($timeout = null)
    {
        foreach ($this->metadataFactory->getAllMetadata() as $class) {
            if ($class->isMappedSuperclass || $class->isEmbeddedDocument) {
                continue;
            }
            $this->updateDocumentIndexes($class->name, $timeout);
        }
    }
public function updateIndexes ( $ timeout = null ) { foreach ( $ this -> metadataFactory -> getAllMetadata ( ) as $ class ) { if ( $ class -> isMappedSuperclass || $ class -> isEmbeddedDocument ) { continue ; } $ this -> updateDocumentIndexes ( $ class -> name , $ timeout ) ; } }
Ensure indexes exist for all mapped document classes.

Indexes that exist in MongoDB but not the document metadata will be
deleted.

@param integer $timeout Timeout (ms) for acknowledged index creation
Ensure indexes exist for all mapped document classes .