Elastica\Aggregation\Histogram::setOrder PHP Method

setOrder() public method

Set the bucket sort order.
public setOrder ( string $order, string $direction )
$order string "_count", "_term", or the name of a sub-aggregation or sub-aggregation response field
$direction string "asc" or "desc"
    public function setOrder($order, $direction)
    {
        return $this->setParam('order', [$order => $direction]);
    }