Database
[{"dateTime":1,"createdAt":10},{"dateTime":10},{"createdAt":1},{"createdAt":10},{"dateTime":10,"createdAt":1}]
Query
db.collection.find({"$or":[{"dateTime":{"$gte":1,"$lte":2}},{"$and":[{"dateTime":{"$exists":false},},{"createdAt":{"$gte":1,"$lte":2}}]}]})