private function getDatasources($indexName)
    {
        $config            = $this->indexSettings->getIndexConfig($indexName);
        $legacyDatasources = $config['datasources'] ?? [];

        $resolver = $this->dataSourceResolverFactory->create(['legacyDataSources' => [$indexName => $legacyDatasources]]);
        $sources  = $resolver->getDataSources($this->indexName);

        return $sources;
    }