lib/Elastica/ResultSet.php
public function getAggregation($name)
    {
        $data = $this->_response->getData();

        if (isset($data['aggregations']) && isset($data['aggregations'][$name])) {
            return $data['aggregations'][$name];
        }
        throw new InvalidException("This result set does not contain an aggregation named {$name}.");
    }
public function getAggregation($name)
    {
        $data = $this->_response->getData();

        if (isset($data['aggregations']) && isset($data['aggregations'][$name])) {
            return $data['aggregations'][$name];
        }
        throw new InvalidException("This result set does not contain an aggregation named {$name}.");
    }
public function getAggregation ( $ name ) { $ data = $ this -> _response -> getData ( ) ; if ( isset ( $ data [ 'aggregations' ] ) && isset ( $ data [ 'aggregations' ] [ $ name ] ) ) { return $ data [ 'aggregations' ] [ $ name ] ; } throw new InvalidException ( "This result set does not contain an aggregation named {$name}." ) ; }
Retrieve a specific aggregation from this result set.

@param string $name the name of the desired aggregation

@throws Exception\InvalidException if an aggregation by the given name cannot be found

@return array
Retrieve a specific aggregation from this result set .