public function createIndexes()
    {
        foreach ($this->schemas as $class => $schema) {
            if ($schema->isEmbedded()) {
                continue;
            }

            $collection = $this->manager->database(
                $schema->getDatabase()
            )->selectCollection(
                $schema->getCollection()
            );

            //Declaring needed indexes
            foreach ($schema->getIndexes() as $index) {
                $collection->createIndex($index->getIndex(), $index->getOptions());
            }
        }
    }
public function createIndexes()
    {
        foreach ($this->schemas as $class => $schema) {
            if ($schema->isEmbedded()) {
                continue;
            }

            $collection = $this->manager->database(
                $schema->getDatabase()
            )->selectCollection(
                $schema->getCollection()
            );

            //Declaring needed indexes
            foreach ($schema->getIndexes() as $index) {
                $collection->createIndex($index->getIndex(), $index->getOptions());
            }
        }
    }
public function createIndexes ( ) { foreach ( $ this -> schemas as $ class => $ schema ) { if ( $ schema -> isEmbedded ( ) ) { continue ; } $ collection = $ this -> manager -> database ( $ schema -> getDatabase ( ) ) -> selectCollection ( $ schema -> getCollection ( ) ) ; //Declaring needed indexes foreach ( $ schema -> getIndexes ( ) as $ index ) { $ collection -> createIndex ( $ index -> getIndex ( ) , $ index -> getOptions ( ) ) ; } } }
Create all declared indexes.

@throws UnsupportedException
@throws DriverException
Create all declared indexes .