What is the limit on the number of elements in an array that can be passed to the MongoDB '$ in' statement in a request?

How many elements can an array contain in the following query?

 db.collection.find({field: {$in: array}}); 
+6
source share
1 answer

The limit for $ in (and any request) is equal to the limit for the document. Currently it is 16 mb. Here are the related Google groups.

+5
source

Source: https://habr.com/ru/post/910387/


All Articles