\Elastica\AggregationHistogram

Class Histogram.

Summary

Methods
Properties
Constants
setField()
setScript()
toArray()
__construct()
setInterval()
setOrder()
setMinimumDocumentCount()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

setField()

setField(string  $field) : $this

Set the field for this aggregation.

Parameters

string $field

the name of the document field on which to perform this aggregation

Returns

$this

setScript()

setScript(string|\Elastica\Script\AbstractScript  $script) : $this

Set a script for this aggregation.

Parameters

string|\Elastica\Script\AbstractScript $script

Returns

$this

toArray()

toArray() 

{@inheritdoc}

__construct()

__construct(string  $name, string  $field, integer|string  $interval) 

Parameters

string $name

the name of this aggregation

string $field

the name of the field on which to perform the aggregation

integer|string $interval

the interval by which documents will be bucketed

setInterval()

setInterval(integer|string  $interval) : $this

Set the interval by which documents will be bucketed.

Parameters

integer|string $interval

Returns

$this

setOrder()

setOrder(string  $order, string  $direction) : $this

Set the bucket sort order.

Parameters

string $order

"_count", "_term", or the name of a sub-aggregation or sub-aggregation response field

string $direction

"asc" or "desc"

Returns

$this

setMinimumDocumentCount()

setMinimumDocumentCount(integer  $count) : $this

Set the minimum number of documents which must fall into a bucket in order for the bucket to be returned.

Parameters

integer $count

set to 0 to include empty buckets

Returns

$this