\Elastica\AggregationBucketSelector

Class BucketSelector.

Summary

Methods
Properties
Constants
setField()
setScript()
toArray()
__construct()
setBucketsPath()
setGapPolicy()
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, array|null  $bucketsPath = null, string|null  $script = null) 

Parameters

string $name
array|null $bucketsPath
string|null $script

setBucketsPath()

setBucketsPath(array  $bucketsPath) : $this

Set the buckets_path for this aggregation.

Parameters

array $bucketsPath

Returns

$this

setGapPolicy()

setGapPolicy(string  $gapPolicy = 'skip') : $this

Set the gap policy for this aggregation.

Parameters

string $gapPolicy

Returns

$this