lib/Elastica/QueryBuilder/DSL/Aggregation.php
public function filter(string $name, AbstractQuery $filter = null): Filter
    {
        return new Filter($name, $filter);
    }
public function filter(string $name, AbstractQuery $filter = null): Filter
    {
        return new Filter($name, $filter);
    }
public function filter ( string $ name , AbstractQuery $ filter = null ) : Filter { return new Filter ( $ name , $ filter ) ; }
filter aggregation.

@see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-filter-aggregation.html

@param string        $name
@param AbstractQuery $filter

@return Filter
filter aggregation .