Created
February 9, 2017 05:57
-
-
Save xexi/eeff1ee639b412670a0432f66f524420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.collection('my_collection').find( { 'findData': 'MorefindOption', | |
$or : [ | |
{ 'name' : { $regex: 'searchWord' , $options: 'ix' } }, | |
{ 'adress' : { $regex: 'searchWord' , $options: 'ix' } } | |
] }) | |
// more option available at google search -> mongodb regex option | |
// -> in mongo cli { name : /.*searchWord.*/i } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment