I\'m struggling to create a query using $or within R and rmongodb. What I\'d like to emulate is this from cmdline mongo:
db.people.find( { $or : [ {\"person
your way of creating an mongo bson array is wrong. You are missing the parts
mongo.bson.buffer.start.object(buf, "0")
...
mongo.bson.buffer.finish.object(buf)
mongo.bson.buffer.start.object(buf, "1")
...
mongo.bson.buffer.finish.object(buf)
For a working example please check the latest comment on: https://github.com/mongosoup/rmongodb/issues/17
I hope this works for now.
There is a bug in all the .to.list / .from.list / .append.list commands. I am working on an easier solution!