From bacaf7fa50479b79ceda0ad6f32cbe3ae0d2dec8 Mon Sep 17 00:00:00 2001 From: Julius Park Date: Wed, 29 Jun 2022 13:11:25 -0700 Subject: [PATCH] PYTHON-3309 Explicit Queryable Encryption doc example needs to utilize index_key_Id (#986) --- doc/examples/encryption.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/examples/encryption.rst b/doc/examples/encryption.rst index 0e349f48d..5c3dc0864 100644 --- a/doc/examples/encryption.rst +++ b/doc/examples/encryption.rst @@ -510,12 +510,12 @@ using an ``encrypted_fields`` mapping, as demonstrated by the following example: db = encrypted_client.test # Create the collection with encrypted fields. - coll = db.create_collection("coll", encrypted_fields=encrypted_fields) + coll = db.create_collection("coll", encryptedFields=encrypted_fields) # Create and encrypt an indexed and unindexed value. val = "encrypted indexed value" unindexed_val = "encrypted unindexed value" - insert_payload_indexed = client_encryption.encrypt(val, Algorithm.INDEXED, indexed_key_id) + insert_payload_indexed = client_encryption.encrypt(val, Algorithm.INDEXED, indexed_key_id, contention_factor=1) insert_payload_unindexed = client_encryption.encrypt(unindexed_val, Algorithm.UNINDEXED, unindexed_key_id) @@ -529,7 +529,7 @@ using an ``encrypted_fields`` mapping, as demonstrated by the following example: # The value of "data_key_id" must be the same as used to encrypt the values # above. find_payload = client_encryption.encrypt( - val, Algorithm.INDEXED, indexed_key_id, query_type=QueryType.EQUALITY + val, Algorithm.INDEXED, indexed_key_id, query_type=QueryType.EQUALITY, contention_factor=1 ) # Find the document we inserted using the encrypted payload.