Open Federico8 opened 6 years ago
I guess that's the default behaviour in mongo db, please try to either:
MongoDB performs a logical OR search of the terms unless specified as a phrase
)Mixing one input as a phrase and one as a term might do the job when limited to 2 terms (from the doc More specifically, the search performs a logical AND of the phrase with the individual terms in the search string
in https://docs.mongodb.com/manual/reference/operator/query/text/#phrases).
Hello there, what i'm trying to achieve is an AND search. Right now if my query string is " red blu" will find any document in which columns (fields) contains red OR blu. What i want here is a document with both red AND blu. (Mongodb).