public function aggregateBy(
        string $filterName,
        string $field,
        int $applicationType,
        array $aggregationSort = Aggregation::SORT_BY_COUNT_DESC,
        int $limit = Aggregation::NO_LIMIT
    ): self {
        $this->aggregations[$filterName] = Aggregation::create(
            $filterName,
            Item::getPathByField($field),
            $applicationType,
            Filter::TYPE_FIELD,
            [],
            $aggregationSort,
            $limit
        );

        return $this;
    }
public function aggregateBy(
        string $filterName,
        string $field,
        int $applicationType,
        array $aggregationSort = Aggregation::SORT_BY_COUNT_DESC,
        int $limit = Aggregation::NO_LIMIT
    ): self {
        $this->aggregations[$filterName] = Aggregation::create(
            $filterName,
            Item::getPathByField($field),
            $applicationType,
            Filter::TYPE_FIELD,
            [],
            $aggregationSort,
            $limit
        );

        return $this;
    }
public function aggregateBy ( string $ filterName , string $ field , int $ applicationType , array $ aggregationSort = Aggregation :: SORT_BY_COUNT_DESC , int $ limit = Aggregation :: NO_LIMIT ) : self { $ this -> aggregations [ $ filterName ] = Aggregation :: create ( $ filterName , Item :: getPathByField ( $ field ) , $ applicationType , Filter :: TYPE_FIELD , [ ] , $ aggregationSort , $ limit ) ; return $ this ; }
Add Families aggregation.

@param string $filterName
@param string $field
@param int    $applicationType
@param array  $aggregationSort
@param int    $limit

@return Query
Add Families aggregation .