I’m Using Aggreate function with following code in my project
$res = array( '$match' => array('WIN_BALANCE' => array('$gte' => 1)), '$group' => array('_id' => '$USER_ID', 'total' => array('$sum' => 'WIN_BALANCE')), '$sort' => array('total' => -1), [$cursor' => ['batchSize' => 0 ]] ); $this->mongo_db->aggregate('user',$res);
But getting below error.
Aggregation operation failed: localhost:27017: The ‘cursor’ option is required, except for aggregate with the explain argument.
I have tired with [‘explain’ => true ] also.
I was searching many forums didn’t get any solutions.
Can you please me out of this.
Thanks in advance