lib/Doctrine/MongoDB/Collection.php
public function isFieldIndexed($fieldName)
    {
        $indexes = $this->getIndexInfo();
        foreach ($indexes as $index) {
            if (isset($index['key']) && isset($index['key'][$fieldName])) {
                return true;
            }
        }
        return false;
    }
public function isFieldIndexed($fieldName)
    {
        $indexes = $this->getIndexInfo();
        foreach ($indexes as $index) {
            if (isset($index['key']) && isset($index['key'][$fieldName])) {
                return true;
            }
        }
        return false;
    }
public function isFieldIndexed ( $ fieldName ) { $ indexes = $ this -> getIndexInfo ( ) ; foreach ( $ indexes as $ index ) { if ( isset ( $ index [ 'key' ] ) && isset ( $ index [ 'key' ] [ $ fieldName ] ) ) { return true ; } } return false ; }
Check if a given field name is indexed in MongoDB.

@param string $fieldName
@return boolean
Check if a given field name is indexed in MongoDB .