Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将如何在学说 odm 中模拟 SQL 中的 like 运算符?
用例:我想在变量 $search 的字段标题字符串中找到一个主题。
查询会是什么样子?
感谢所有答案
使用MongoRegex
$qb->field($field)->equals(new \MongoRegex('/.*paliw.*/i'));
来源
但我建议使用单独的搜索引擎(狮身人面像,Solr)