What is the maximum number of parameters passed to $in query in MongoDB?
Looks like there is no limitation.
I did a small test.
1) Collection A had - 1 Million simple JSON object {id:,name:}
2) In Collection B, I loaded reference ids of collection A till I got the following exception. I could insert a reference count of 450k of max.
Exception in thread "main" com.mongodb.MongoInternalException: DBObject of size 18388885 is over Max BSON size 16777216
3) I could send 450k of these ids as $in[id1...id450000] and pull the whole list of 450k ids from 1 Million objects in collection A.
Wow! this is more more more than enough for my application :D. MongoDB is really cool.