@@ -510,12 +510,12 @@ using an ``encrypted_fields`` mapping, as demonstrated by the following example:
510
510
db = encrypted_client.test
511
511
512
512
# Create the collection with encrypted fields.
513
- coll = db.create_collection("coll", encrypted_fields =encrypted_fields)
513
+ coll = db.create_collection("coll", encryptedFields =encrypted_fields)
514
514
515
515
# Create and encrypt an indexed and unindexed value.
516
516
val = "encrypted indexed value"
517
517
unindexed_val = "encrypted unindexed value"
518
- insert_payload_indexed = client_encryption.encrypt(val, Algorithm.INDEXED, indexed_key_id)
518
+ insert_payload_indexed = client_encryption.encrypt(val, Algorithm.INDEXED, indexed_key_id, contention_factor=1 )
519
519
insert_payload_unindexed = client_encryption.encrypt(unindexed_val, Algorithm.UNINDEXED,
520
520
unindexed_key_id)
521
521
@@ -529,7 +529,7 @@ using an ``encrypted_fields`` mapping, as demonstrated by the following example:
529
529
# The value of "data_key_id" must be the same as used to encrypt the values
530
530
# above.
531
531
find_payload = client_encryption.encrypt(
532
- val, Algorithm.INDEXED, indexed_key_id, query_type=QueryType.EQUALITY
532
+ val, Algorithm.INDEXED, indexed_key_id, query_type=QueryType.EQUALITY, contention_factor=1
533
533
)
534
534
535
535
# Find the document we inserted using the encrypted payload.
0 commit comments