I am trying to do the following query:
Query
the problem is {"id": {"$nin": lista}}
. lista is an array of ids that cointains 1.000.000 ids exceeding 98MB size.
Since Mongodb has a limit of 16MB it seems i cannot send this query without getting the following error: pymongo.errors.DocumentTooLarge: BSON document too large (107382731 bytes) - the connected server supports BSON document sizes up to 16777216 bytes.
. Something I dont complete understand because the limit is supposted to be for documents inside collections.
My question is: How I can exclude a list/array of ids then?
Copyright Notice:Content Author:「Jofetu」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/63013365/mongodb-pymongo-errors-documenttoolarge