The 'cursor' option is required.. even if it is set

124 views
Skip to first unread message

Josef Sábl

unread,
Nov 23, 2018, 6:50:19 AM11/23/18
to mongodb-user
Hello, am I doing something wrong or is this a bug? Reported here: https://jira.mongodb.org/browse/SERVER-38234

After running this aggregation, I get this error: The 'cursor' option is required, except for aggregate with the explain argument

The cursor IS THERE. When I remove the out stage it works.

db.StatEvent.aggregate([
   
{
        $match
: {
           
'time': {$gt: timeLastRun}
       
}
   
},
   
{$out: tempAggrName}
], {
 cursor
: { batchSize: 0 }
});

Stephen Steneker

unread,
Nov 26, 2018, 1:30:01 AM11/26/18
to mongodb-user
On Friday, 23 November 2018 22:50:19 UTC+11, Josef Sábl wrote:
Hello, am I doing something wrong or is this a bug? Reported here: https://jira.mongodb.org/browse/SERVER-38234

After running this aggregation, I get this error: The 'cursor' option is required, except for aggregate with the explain argument

Hi Josef,

Are you using any mongo shell extensions (for example, mongo-hacker)? Can you start the shell using mongo --norc and try again?

If the problem is still reproducible after starting up with mongo --norc, what is the output of version() (shell version) and db.version() (server version)?

Thanks,
Stennie
Reply all
Reply to author
Forward
0 new messages