Docs Home / Compass / Interact with Your Data / Manage Collections

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

Queryable Encryption with equality queries is generally available (GA) in MongoDB 7.0 and later. The Queryable Encryption Public Preview, released in version 6.0, is no longer supported. MongoDB 7.0及更高版本中通常提供具有相等查询的可查询加密(GA)。不再支持6.0版本中发布的可查询加密公共预览版。Data encrypted using the Public Preview is incompatible with the feature release. For more information, see Compatibility Changes in MongoDB 7.0.使用公共预览加密的数据与功能版本不兼容。有关更多信息,请参阅MongoDB 7.0中的兼容性更改

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

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 you can use with Queryable Encryption.“自定义排序规则”是您可以与可查询加密一起使用的唯一“高级集合选项”。

Procedure过程

1

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

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

2

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

3

Click the Additional preferences 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.集合将被标记为“可查询加密”徽章。