Mongo DB with Yii2 - word present in description ignore that record

Hi Team,

I am using Mongo DB with YII2 (PHP framework), I am fetching records from database(Mongo) and I have one word and searching in description, if word present in description so I don’t have to fetch such record from database(Mongo).

Please let me know Mongo DB query and how that I have to add YII2 .

Please find below query in MySQL and same I need in Mongo DB.
select * from product where description not like “%Soap%”

Request you to please help.

You can use analogous MQL query:

db.product.find( { "description": {"$not": /Soap/} })

/Soap/ has implicit wildcards before and after, in other words it matches any description that has the string Soap anywhere in it, and "$not" … well, it’s pretty self-explanatory…