mongodb $text 全文搜索如何实现OR?
迷茫
迷茫 2017-05-02 09:26:13
0
1
501

"\"ssl certificate\" authority key"

The $text operator searches for the phrase "ssl certificate" and ("authority" or "key" or "ssl" or "certificate" ).

这是文档里的一个例子,使用\"括起来的叫做Phrases,mongodb为它执行and操作,其他词用空格分割执行or操作。

{"$text": {"$search": "\"ssl certificate\" authority key"}}的搜索结果一定会包含"ssl certificate"。
有没有方法可以对'ssl certificate', 'authority', 'key'实现or的全文搜索呢?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!