4

I am trying to play with bulk operations in MongoDB but keep getting the following error:

TypeError: db.items.initializeUnorderedBulkOp is not a function (shell):1

... when executing this line in shell:

var bulk = db.items.initializeUnorderedBulkOp();

What am I missing here?

PS: the mongo server I use is hosted on MongoLab, db.version() reports version 2.6.5.

Jehof
  • 34,674
  • 10
  • 123
  • 155
Eugene Loy
  • 12,224
  • 8
  • 53
  • 79
  • 2
    using mongo.exe i can execute the command. using RoboMongo not and i get the same error – Jehof Dec 17 '14 at 11:20
  • 3
    @Jehof RoboMongo is not yet upgraded to the same status as the MongoDB 2.6 shell. It still relies on the MongoDB 2.4 dependenies of the SpiderMonkey JavaScript engine as well as missing various helpers built in from the 2.6 upgrade. Bulk operations are a part of that upgrade. – Neil Lunn Dec 17 '14 at 11:31
  • @Jehof Hopefully will be fixed one day. This is outstanding for near a year now and really the whole RoboMongo build needs to be fixed to accommodate this. Maybe some time over the holidays. It does smell a bit though that the OP is experiencing the same problem for probably the same reason though. – Neil Lunn Dec 17 '14 at 11:53
  • @Jehof, NeilLunn, thanks, I do use RoboMongo, so, probably that's the reason. I will try to use plain mongo shell later today to confirm this. Meanwhile, could you, please, post your comment as an answer, so I could accept it. – Eugene Loy Dec 17 '14 at 12:35

1 Answers1

3

Using mongo.exe I can execute the command without any problems. Using RoboMongo I get the same error as you noted.

Taken from comment:

RoboMongo is not yet upgraded to the same status as the MongoDB 2.6 shell. It still relies on the MongoDB 2.4 dependenies of the SpiderMonkey JavaScript engine as well as missing various helpers built in from the 2.6 upgrade. Bulk operations are a part of that upgrade. – Neil Lunn

Jehof
  • 34,674
  • 10
  • 123
  • 155