Docs HomeMongoDB Manual

Projection Operators投影运算符

Projection operators specify the fields returned by an operation.投影运算符指定操作返回的字段。

Note

find() operations on views do not support the following Query and Projection Operators operators:视图上的find()操作不支持以下查询和投影运算符

Note

For details on a specific operator, including syntax and examples, click on the link to the operator's reference page.有关特定运算符的详细信息,包括语法和示例,请单击该运算符参考页的链接。

Name名称Description描述
$Projects the first element in an array that matches the query condition.投影数组中与查询条件匹配的第一个元素。
$elemMatchProjects the first element in an array that matches the specified $elemMatch condition.投影数组中与指定$elemMatch条件匹配的第一个元素。
$metaProjects the available per-document metadata.投影每个文档可用的元数据。
$sliceLimits the number of elements projected from an array. 限制从数组投影的元素数。Supports skip and limit slices.支持跳过和限制分片。