Query and Projection Operators查询和投影运算符
On this page本页内容
Note
For details on a specific operator, including syntax and examples, click on the link to the operator's reference page.有关特定运算符的详细信息,包括语法和示例,请单击该运算符参考页的链接。
Query Selectors查询选择器
Comparison比较
For comparison of different BSON type values, see the specified BSON comparison order.有关不同BSON类型值的比较,请参阅指定的BSON比较顺序。
$eq | |
$gt | |
$gte | |
$in | |
$lt | |
$lte | |
$ne | |
$nin |
Logical逻辑
$and | AND returns all documents that match the conditions of both clauses. |
$not | |
$nor | NOR returns all documents that fail to match both clauses. |
$or | OR returns all documents that match the conditions of either clause. |
Element元素
$exists | |
$type |
Evaluation计算
$expr | |
$jsonSchema | |
$mod | |
$regex | |
$text | |
$where |
Geospatial地理空间
$geoIntersects | $geoIntersects .2dsphere 索引支持$geoIntersects 。 |
$geoWithin | $geoWithin .2dsphere 和2d 索引支持$geoWithin 。 |
$near | $near .2dsphere 和2d 索引支持$near 。2dsphere 和2d 索引支持$near 。 |
$nearSphere | $nearSphere .2dsphere 和2d 索引支持$nearSphere 。 |
Array数组
$all | |
$elemMatch | $elemMatch conditions.$elemMatch 条件匹配,则选择文档。 |
$size |
Bitwise按位
$bitsAllClear | 0 .0 的数值或二进制值。 |
$bitsAllSet | 1 .1 的数值或二进制值。 |
$bitsAnyClear | 0 .0 。 |
$bitsAnySet | 1 .1 。 |
Projection Operators投影运算符
$ | |
$elemMatch | $elemMatch condition.$elemMatch 条件匹配的第一个元素。 |
$meta | $text operation.$text 操作期间分配的文档分数。 |
$slice |
Miscellaneous Operators杂项运算符
$comment | |
$rand |