I have this query
mongorestore --db xxx --collection categories --filter '{"creation_date": {"$gt": ISODate("2015-06-06T20:00:00Z")}}' /backups/xxx/dump/xxx/xxx.bson
And have this error
assertion: 16619 code FailedToParse: FailedToParse: Bad characters in value: offset:25 of:{"creation_date": {"$gt": ISODate("2015-06-06T20:00:00Z")}}
I think mongorestore is not happy with ISODate, any ideas?
Use the version for strict mode
I had the same problem then I found this GitHub issue that points to this JIRA issue that states, that we can use
{"$date": "2015-06-06T20:00:00Z"}
instead ofISODate("2015-06-06T20:00:00Z")
so your query should look like this:This feature is documented in MongoDB Extended JSON.