\Elastica\AggregationAbstractTermsAggregation

Class AbstractTermsAggregation.

Summary

Methods
Properties
Constants
setField()
setScript()
toArray()
setMinimumDocumentCount()
setInclude()
setExclude()
setSize()
setShardSize()
setExecutionHint()
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}

setMinimumDocumentCount()

setMinimumDocumentCount(integer  $count) : $this

Set the minimum number of documents in which a term must appear in order to be returned in a bucket.

Parameters

integer $count

Returns

$this

setInclude()

setInclude(string  $pattern, string  $flags = null) : $this

Filter documents to include based on a regular expression.

Parameters

string $pattern

a regular expression

string $flags

Java Pattern flags

Returns

$this

setExclude()

setExclude(string  $pattern, string  $flags = null) : $this

Filter documents to exclude based on a regular expression.

Parameters

string $pattern

a regular expression

string $flags

Java Pattern flags

Returns

$this

setSize()

setSize(integer  $size) : $this

Sets the amount of terms to be returned.

Parameters

integer $size

the amount of terms to be returned

Returns

$this

setShardSize()

setShardSize(integer  $shardSize) : $this

Sets how many terms the coordinating node will request from each shard.

Parameters

integer $shardSize

the amount of terms to be returned

Returns

$this

setExecutionHint()

setExecutionHint(string  $hint) : $this

Instruct Elasticsearch to use direct field data or ordinals of the field values to execute this aggregation.

The execution hint will be ignored if it is not applicable.

Parameters

string $hint

map or ordinals

Returns

$this