Method |
Description |
|
addScriptField ( string $name, Elastica\Script\AbstractScript $script ) |
Adds a Script to the aggregation. |
|
setExplain ( boolean $explain ) |
Enables explanation for each hit on how its score was computed. |
|
setFieldDataFields ( array $fields ) |
Allows to return the field data representation of a field for each hit. |
|
setFrom ( integer $from ) |
The offset from the first result you want to fetch. |
|
setHighlight ( array $highlightArgs ) |
Sets highlight arguments for the results. |
|
setScriptFields ( array | ScriptFields $scriptFields ) |
Set script fields. |
|
setSize ( integer $size ) |
The maximum number of top matching hits to return per bucket. By default the top three matching hits are returned. |
|
setSort ( array $sortArgs ) |
How the top matching hits should be sorted. By default the hits are sorted by the score of the main query. |
|
setSource ( array | boolean $params ) |
Allows to control how the _source field is returned with every hit. |
|
setVersion ( boolean $version ) |
Returns a version for each search hit. |
|
toArray ( ) : array |
|
|