PHP Class Elastica\Aggregation\Range

Inheritance: extends AbstractSimpleAggregation
Mostrar archivo Open project: ruflin/elastica Class Usage Examples

Public Methods

Method Description
addRange ( integer | float $fromValue = null, integer | float $toValue = null, string $key = null ) Add a range to this aggregation.
setKeyedResponse ( boolean $keyed = true ) If set to true, a unique string key will be associated with each bucket, and ranges will be returned as an associative array.

Method Details

addRange() public method

Add a range to this aggregation.
public addRange ( integer | float $fromValue = null, integer | float $toValue = null, string $key = null )
$fromValue integer | float low end of this range, exclusive (greater than or equal to)
$toValue integer | float high end of this range, exclusive (less than)
$key string customized key value

setKeyedResponse() public method

If set to true, a unique string key will be associated with each bucket, and ranges will be returned as an associative array.
public setKeyedResponse ( boolean $keyed = true )
$keyed boolean