enable $and operator for multiple words in a search term (not only $or)
It seems a commonly needed ability to decrease the amount of results from a multi-word search query instead of expanding it, since the default operator for every word is $or. If there could be a built-in $and option it will be great. Thank you.
-
AdminMarcus Eagan (Admin, MongoDB) commented
You can get and- + or-type operators in two ways. The clunky way is to use query string. The more scalable and maintainable approach is to use compound. should is or. must is and. mustNot is and not.
Compound: https://docs.atlas.mongodb.com/atlas-search/compound/
Query String: https://docs.atlas.mongodb.com/atlas-search/queryString/Query String is easier for people to wrap their heads around earlier, but it is far more limited and less flexible than compound.