private function getAggregationsConfig($attributes)
    {
        $aggregations = [];
        foreach ($attributes as $attribute) {
            $bucketConfig                        = $this->getBucketConfig($attribute);
            $aggregations[$bucketConfig['name']] = $bucketConfig;
        }

        return $aggregations;
    }