private function loadIndexTemplateManager(ContainerBuilder $container)
    {
        $indexTemplateRefs = array_map(function ($index) {
            return $index['reference'];
        }, $this->indexTemplateConfigs);

        $managerDef = $container->getDefinition('fos_elastica.index_template_manager');
        $managerDef->replaceArgument(0, $indexTemplateRefs);
    }