how would i go about simulating the like operator from SQL in doctrine odm?
use case: i want to find a Theme that has somewhere in the field caption string in a variable $search.
How would the query look like?
thanks for all answers
use MongoRegex
$qb->field($field)->equals(new \MongoRegex('/.*paliw.*/i'));
source
But i recomed use separate search engine (sphinx, Solr)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With