elasticsearch\Query minScore()

minScore() public method (available since version 2.0.4) See also http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-min-score.html. public static minScore ( $minScore )$minScore float Exclude documents which have a _score less than the minimum specified minScore return static The query object itself

elasticsearch\Query init()

init() public method Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration. public void init ( )

elasticsearch\Query highlight()

highlight() public method Sets a highlight parameters to retrieve from the documents. See also http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html. public $this highlight ( $highlight )$highlight array Array of parameters to highlight results. return $this The query object itself

elasticsearch\Query from()

from() public method Sets the index and type to retrieve documents from. See also http://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html#search-multi-index-type. public $this from ( $index, $type = null )$index string|array The index to retrieve data from. This can be a string representing a single index or a an array of multiple indexes. If this is null it means that all indexes are being queried. $type string|array The type to retrieve data from. This c

elasticsearch\Query filter()

filter() public method Sets the filter part of this search query. public $this filter ( $filter )$filter string return $this The query object itself

elasticsearch\Query fields()

fields() public method Sets the fields to retrieve from the documents. See also http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-fields.html. public $this fields ( $fields )$fields array The fields to be selected. return $this The query object itself

elasticsearch\Query exists()

exists() public method Returns a value indicating whether the query result contains any row of data. public boolean exists ( $db = null )$db yii\elasticsearch\Connection The database connection used to execute the query. If this parameter is not given, the elasticsearch application component will be used. return boolean Whether the query result contains any row of data.

elasticsearch\Query each()

each() public method (available since version 2.0.4) Starts a batch query and retrieves data row by row. This method is similar to batch() except that in each iteration of the result, only one row of data is returned. For example, $query = (new Query)->from('user'); foreach ($query->each() as $row) { } public yii\elasticsearch\BatchQueryResult each ( $scrollWindow = '1m', $db = null )$scrollWindow string How long Elasticsearch should keep the search context alive, in time units $

elasticsearch\Query delete()

delete() public method Executes the query and deletes all matching documents. Everything except query and filter will be ignored. public array delete ( $db = null, $options = [] )$db yii\elasticsearch\Connection The database connection used to execute the query. If this parameter is not given, the elasticsearch application component will be used. $options array The options given with this query. return array The query results.

elasticsearch\Query createCommand()

createCommand() public method Creates a DB command that can be used to execute this query. public yii\elasticsearch\Command createCommand ( $db = null )$db yii\elasticsearch\Connection The database connection used to execute the query. If this parameter is not given, the elasticsearch application component will be used. return yii\elasticsearch\Command The created DB command instance.