momy
momy copied to clipboard
ns field has bson.D value that is not string or valid MongoDb
Thanks for this great work!! I'm getting this error, has anyone seen it?
name: 'MongoError', message: 'ns field has bson.D value that is not string or valid MongoDb RegEx: Error parsing value [{$in [db.collection db.collection2 db.collection2]}] to RegEx: Must specify $regex field', ok: 0, errmsg: 'ns field has bson.D value that is not string or valid MongoDb RegEx: Error parsing value [{$in [db.collection db.collection2 db.collection2]}] to RegEx: Must specify $regex field', code: 8000, codeName: 'AtlasError' }
@nloui did you got any fix for this issue?
I got the solution The Query is using the "$in" and "$nin", instead of using $in or $nin need to use the $regex, I tried with $regex, it fetching proper data
db.oplog.rs.find({ns:{$regex:"^ORG_DB."}}).pretty()
this is working but if using the $in or $nin it retuns the ns field has bson.D value that is not string error which is kind of type miss matching error