yii\elasticsearch\Query::stats PHP Method

stats() public method

Adds a 'stats' part to the query.
See also: http://www.elastic.co/guide/en/elasticsearch/reference/current/search.html#stats-groups
public stats ( array $groups )
$groups array an array of groups to maintain a statistics aggregation for.
    public function stats($groups)
    {
        $this->stats = $groups;
        return $this;
    }