Reputation: 2650
The following query works perfectly in mongodb 3.6 but in documentdb it throws an error.
db.house.count({'data.foo.d':/2019-05/})
connecting to: docdb.xxxxxxxxxxx.xxxxxx.int:27017/dbname
2019-06-04T20:39:14.339+0000 E QUERY [thread1] Error: count failed: { "ok" : 0, "errmsg" : "operation was interrupted", "code" : 11601 } :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DBQuery.prototype.count@src/mongo/shell/query.js:370:11
DBCollection.prototype.count@src/mongo/shell/collection.js:1713:12
@(shell):1:1```
Upvotes: 2
Views: 2895
Reputation: 227
I would suggest running explain on this. It seems like you are hitting the DocumentDB 2 hour query timeout. See if you can build an index which can be utilized for the count query.
Upvotes: 0