PHP Class Elastica\Aggregation\Histogram

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

Public Methods

Method Description
__construct ( string $name, string $field, integer $interval )
setInterval ( integer $interval ) Set the interval by which documents will be bucketed.
setMinimumDocumentCount ( integer $count ) Set the minimum number of documents which must fall into a bucket in order for the bucket to be returned.
setOrder ( string $order, string $direction ) Set the bucket sort order.

Method Details

__construct() public method

public __construct ( string $name, string $field, integer $interval )
$name string the name of this aggregation
$field string the name of the field on which to perform the aggregation
$interval integer the interval by which documents will be bucketed

setInterval() public method

Set the interval by which documents will be bucketed.
public setInterval ( integer $interval )
$interval integer

setMinimumDocumentCount() public method

Set the minimum number of documents which must fall into a bucket in order for the bucket to be returned.
public setMinimumDocumentCount ( integer $count )
$count integer set to 0 to include empty buckets

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"