NestedAggregation example

$path = null;
        if (\count($fields) > 0) {
            $path = $this->getNestedPath($definition$fields[0]);
        }

        $esAggregation = $this->createAggregation($aggregation$fieldName$definition$context);

        if (!$path || $aggregation instanceof FilterAggregation) {
            return $esAggregation;
        }

        $nested = new NestedAggregation($aggregation->getName()$path);
        $nested->addAggregation($esAggregation);

        return $nested;
    }

    public function parseFilter(Filter $filter, EntityDefinition $definition, string $root, Context $context): BuilderInterface
    {
        return match (true) {
            $filter instanceof NotFilter => $this->parseNotFilter($filter$definition$root$context),
            $filter instanceof MultiFilter => $this->parseMultiFilter($filter$definition$root$context),
            $filter instanceof EqualsFilter => $this->parseEqualsFilter($filter$definition$context),
            
Home | Imprint | This part of the site doesn't use cookies.