addAggregations example

$result = $this->hydrator->hydrate($definition$criteria$context$result);
        $result->addState(self::RESULT_STATE);

        return $result;
    }

    private function createSearch(EntityDefinition $definition, Criteria $criteria, Context $context): Search
    {
        $search = new Search();
        $this->helper->addFilters($definition$criteria$search$context);
        $this->helper->addQueries($definition$criteria$search$context);
        $this->helper->addAggregations($definition$criteria$search$context);
        $this->helper->addTerm($criteria$search$context$definition);
        $this->helper->handleIds($definition$criteria$search$context);
        $search->setSize(0);

        return $search;
    }
}
Home | Imprint | This part of the site doesn't use cookies.