{ "player.status": "ACTIVE", "game.league.abbreviation": "MLB", $and: [ { "game.gameDate": { $gt: "2016-04-21T06:00:00.000Z" } }, { "game.gameDate": { $lt: "2016-04-22T05:00:00.000Z" } } ] }
Hi Matt,
I’m not sure I fully understand your use case yet. It seems to me that you:
Is my understanding correct?
If this is correct, you might be better served by performing the updates using a db.collection.update()
directly in the database. Performing the updates using a separate tool which also involves exporting and re-importing data may not conserve the BSON datatypes (which is how the documents are stored in MongoDB), as you may have found.
Some information that may help:
db.collection.updateMany()
statement to update multiple documents at once.{multi:true}
parameter in db.collection.update()
statement to achieve the same effect (e.g. db.collection.update({<query>}, {multi:true})
).If you’re still having difficulties with this issue, could you please provide:
Best regards,
Kevin