private function processIndices($indices, callable $callback)
    {
        $response = [];

        foreach ($indices as $index) {
            $response[$index->indexName] = \call_user_func($callback, $index);
        }

        return $response;
    }