$_params
$_params : array
Params.
Elastica query object.
Creates different types of queries
__construct(array|\Elastica\Query\AbstractQuery $query = null)
Creates a query object.
array|\Elastica\Query\AbstractQuery | $query | OPTIONAL Query object (default = null) |
setQuery(\Elastica\Query\AbstractQuery $query) : $this
Sets the query.
\Elastica\Query\AbstractQuery | $query | Query object |
getQuery() : \Elastica\Query\AbstractQuery
Gets the query object.
setStoredFields(array $fields) : $this
Sets the fields to be returned by the search NOTICE php will encode modified(or named keys) array into object format in json format request so the fields array must a sequence(list) type of array.
array | $fields | Fields to be returned |
setScriptFields(array|\Elastica\Script\ScriptFields $scriptFields) : $this
Set script fields.
array|\Elastica\Script\ScriptFields | $scriptFields | Script fields |
addScriptField(string $name, \Elastica\Script\AbstractScript $script) : $this
Adds a Script to the query.
string | $name | |
\Elastica\Script\AbstractScript | $script | Script object |
addAggregation(\Elastica\Aggregation\AbstractAggregation $agg) : $this
Adds an Aggregation to the query.
\Elastica\Aggregation\AbstractAggregation | $agg |
setSuggest(\Elastica\Suggest $suggest) : $this
Add a suggest term.
\Elastica\Suggest | $suggest | suggestion object |
setPostFilter(array|\Elastica\Query\AbstractQuery $filter) : $this
Sets post_filter argument for the query. The filter is applied after the query has executed.
array|\Elastica\Query\AbstractQuery | $filter |