Docs HomeMongoDB Compass

Create a Collection with Queryable Encryption使用可查询加密创建集合

Note
Queryable Encryption is in Public Preview and available for evaluation purposes. 可查询加密在公共预览中,可用于评估目的。Public Preview is not recommended for production deployments as breaking changes may be introduced. 生产部署不建议使用公共预览,因为可能会引入破坏性更改。To learn more about the Preview please see the Queryable Encryption Preview blog post.要了解有关预览的更多信息,请参阅查询加密预览博客文章。

Queryable Encryption allows you to encrypt a subset of fields in your collection.可查询加密允许您加密集合中的字段子集。

Procedure过程

1

Click the Create Collection button.单击“创建集合”按钮。

From the Collections screen, click the Create Collection button.在“集合”屏幕中,单击“创建集合”按钮。

2

Enter the collection name.输入集合名称。

3

Click the Advanced Collection Options dropdown.单击“高级集合选项”下拉列表。

Check the Queryable Encryption option.选中“可查询加密”选项。

4

Specify an Encrypted Field.指定“加密字段”。

Specify which fields should be encrypted and whether they should be queryable.指定应加密哪些字段以及这些字段是否应可查询。

The following fields must be used if no existing keyId was specified for at least one encrypted field, and have no effect otherwise:如果没有为至少一个加密字段指定现有的keyId,则必须使用以下字段,否则无效:

5

Click Create Collection to create the collection.单击“创建集合”以创建集合。

Your collection will be marked by a Queryable Encryption badge.您的集合将用“可查询加密”徽章进行标记。

Restrictions and Limitations限制和局限性

  • Your deployment must be connected using In-Use Encryption to encrypt your collection using Queryable Encryption.您的部署必须使用使用中加密进行连接,才能使用可查询加密对集合进行加密。
  • Custom collation is the only Advanced Collection Option that can be used alongside Queryable Encryption.“自定义排序规则”是唯一可以与“可查询加密”一起使用的“高级集合选项”。