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

$db yii\elasticsearch\Connection

The database connection. If not set, the elasticsearch application component will be used.

return yii\elasticsearch\BatchQueryResult

The batch query result. It implements the Iterator interface and can be traversed to retrieve the data in batches.

doc_Yii
2016-10-30 17:02:05
Comments
Leave a Comment

Please login to continue.