如何在MongoDB指南针中查询您的数据,并使用案例不敏感的选项查询您的数据?
我正在尝试使用中的$在多个值中查询MongoDB Compass GUI中的数据。
我的查询是 -
{category : {[$in: ['a012','b23c','5870T']}}
我想通过案例不敏感的选项i
查询这些值。 中的操作员$也不接受根据文档接受正则表达式。
包括案例不敏感选项的正确查询是什么?
I am trying to query data in MongoDB compass GUI based on multiple values using $in
.
My query is this -
{category : {[$in: ['a012','b23c','5870T']}}
I want to query these values with case insensitive option i
. The operator $in
also doesn't accept regex expressions as per documentation.
What would be the correct query with the case insensitive option included?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试以下操作:
多种方法:
\ b
m
选项来匹配开始并结束字符串Try this:
A couple of ways to do this:
\b
m
option to match the beginning and end of the string