Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use articles
- db.stores.insert( [ {_id : 1, arr : ['abc xyz', 'def']}, {_id : 2, arr : ['jadskf', 'ljh abc']}])
- db.stores.createIndex({"arr" : "text"})
- > db.stores.find({$text : {$search : "abc"}})
- { "_id" : 1, "arr" : [ "abc xyz", "def" ] }
- { "_id" : 2, "arr" : [ "jadskf", "ljh abc" ] }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement