hydrateSortedTermsAggregation example



            $buckets[] = new Bucket($value$bucket['doc_count']$nested);
        }

        return new DateHistogramResult($aggregation->getName()$buckets);
    }

    private function hydrateTermsAggregation(TermsAggregation $aggregation, array $result, Context $context): ?TermsResult
    {
        if ($aggregation->getSorting()) {
            return $this->hydrateSortedTermsAggregation($aggregation$result$context);
        }

        if (isset($result[$aggregation->getName()])) {
            $result = $result[$aggregation->getName()];
        }

        $key = $aggregation->getName() . '.key';
        if (isset($result[$key])) {
            $result = $result[$key];
        }

        
Home | Imprint | This part of the site doesn't use cookies.