public function getIndexInfo()
    {
        $convertIndex = function (\MongoDB\Model\IndexInfo $indexInfo) {
            $infos = [
                'v' => $indexInfo->getVersion(),
                'key' => $indexInfo->getKey(),
                'name' => $indexInfo->getName(),
                'ns' => $indexInfo->getNamespace(),
            ];

            $additionalKeys = [
                'unique',
                'sparse',
                'partialFilterExpression',
                'expireAfterSeconds',
                'storageEngine',
                'weights',
                'default_language',
                'language_override',
                'textIndexVersion',
                'collation',
                '2dsphereIndexVersion',
                'bucketSize'
            ];

            foreach ($additionalKeys as $key) {
                if (! isset($indexInfo[$key])) {
                    continue;
                }

                $infos[$key] = $indexInfo[$key];
            }

            return $infos;
        };

        return array_map($convertIndex, iterator_to_array($this->collection->listIndexes()));
    }