PHP Class Elastica\Aggregation\IpRange

Inheritance: extends AbstractAggregation
Show file Open project: ruflin/elastica Class Usage Examples

Public Methods

Method Description
__construct ( string $name, string $field )
addMaskRange ( string $mask ) Add an ip range in the form of a CIDR mask.
addRange ( string $fromValue = null, string $toValue = null ) Add an ip range to this aggregation.
setField ( string $field ) Set the field for this aggregation.

Method Details

__construct() public method

public __construct ( string $name, string $field )
$name string the name of this aggregation
$field string the field on which to perform this aggregation

addMaskRange() public method

Add an ip range in the form of a CIDR mask.
public addMaskRange ( string $mask )
$mask string a valid CIDR mask

addRange() public method

Add an ip range to this aggregation.
public addRange ( string $fromValue = null, string $toValue = null )
$fromValue string a valid ipv4 address. Low end of this range, exclusive (greater than)
$toValue string a valid ipv4 address. High end of this range, exclusive (less than)

setField() public method

Set the field for this aggregation.
public setField ( string $field )
$field string the name of the document field on which to perform this aggregation