I have the fol docs:
db.docs.insert({_id:1, title:"make: aaa, model: 12"})
db.docs.insert({_id:2, title:"make: bab, model: 1"})
db.docs.insert({_id:3, title:"make: bab, model: 12"})
I search for bab 12
and need mongo to return me only doc #3.
Unforturnately I cannot find a suitable query.
Obviously db.docs.find( { $text: { $search: "bab 12" } } )
returns all 3 docs
and db.docs.find( { $text: { $search: "\"bab 12\"" } } )
returns nothing.
Is there a way to do this, without regex (which is too slow - I have millions of docs in docs collection)?