public function create($bucketType, $bucketParams)
    {
        if (!isset($this->factories[$bucketType])) {
            throw new \LogicException("No factory found for aggregation of type {$bucketType}");
        }

        return $this->factories[$bucketType]->create($bucketParams);
    }