Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ns field has bson.D value that is not string or valid MongoDb #19

Open
nloui opened this issue Aug 29, 2017 · 2 comments
Open

ns field has bson.D value that is not string or valid MongoDb #19

nloui opened this issue Aug 29, 2017 · 2 comments

Comments

@nloui
Copy link

nloui commented Aug 29, 2017

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' }

@bhanwarc
Copy link

@nloui did you got any fix for this issue?

@bhanwarc
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants