Méthode |
Description |
|
__construct ( array | Elastica\Query\AbstractQuery $query = null ) |
Creates a query object. |
|
addAggregation ( AbstractAggregation $agg ) |
Adds an Aggregation to the query. |
|
addHighlight ( mixed $highlight ) |
Adds a highlight argument. |
|
addScriptField ( string $name, Elastica\Script\AbstractScript $script ) |
Adds a Script to the query. |
|
addSort ( mixed $sort ) |
Adds a sort param to the query. |
|
create ( mixed $query ) : self |
Transforms a string or an array to a query object. |
|
getQuery ( ) : Elastica\Query\AbstractQuery |
Gets the query object. |
|
setExplain ( boolean $explain = true ) |
Enables explain on the query. |
|
setFieldDataFields ( array $fieldDataFields ) |
Sets the fields not stored to be returned by the search. |
|
setFrom ( integer $from ) |
Sets the start from which the search results should be returned. |
|
setHighlight ( array $highlightArgs ) |
Sets highlight arguments for the query. |
|
setMinScore ( float $minScore ) |
Allows filtering of documents based on a minimum score. |
|
setPostFilter ( Elastica\Query\AbstractQuery $filter ) |
Sets post_filter argument for the query. The filter is applied after the query has executed. |
|
setQuery ( Elastica\Query\AbstractQuery $query ) |
Sets the query. |
|
setRawQuery ( array $query ) |
Sets query as raw array. Will overwrite all already set arguments. |
|
setRescore ( mixed $rescore ) |
Add a Rescore. |
|
setScriptFields ( array | ScriptFields $scriptFields ) |
Set script fields. |
|
setSize ( integer $size = 10 ) |
Sets maximum number of results for this query. |
|
setSort ( array $sortArgs ) |
Sets sort arguments for the query
Replaces existing values. |
|
setSource ( array | boolean $params ) |
Sets the _source field to be returned with every hit. |
|
setStoredFields ( array $fields ) |
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. |
|
setSuggest ( Suggest $suggest ) |
Add a suggest term. |
|
setTrackScores ( boolean $trackScores = true ) |
Keep track of the scores when sorting results. |
|
setVersion ( boolean $version = true ) |
Enables version on the query. |
|
toArray ( ) : array |
Converts all query params to an array. |
|