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 |
return | yii\elasticsearch\BatchQueryResult |
The batch query result. It implements the Iterator interface and can be traversed to retrieve the data in batches. |
Please login to continue.