// Exact match
db.COLLECTION_NAME.find({ "textos.g" : "A phrase" });
// Case sensitive
db.COLLECTION_NAME.find({ "textos.g" : /.*god.*/ });
db.COLLECTION_NAME.find({ "textos.g" : /.*God.*/ });
// Case insensitive
db.COLLECTION_NAME.find({ "textos.g" : /.*god.*/i });
// Starts with
db.COLLECTION_NAME.find({ "textos.g" : /^g/i });
No comments:
Post a Comment