@@ -3878,6 +3878,9 @@ create the following collections with majority write concern:
38783878- ` db.prefix-suffix-ci-di ` using the ` encryptedFields ` option set to the contents of
38793879 [encryptedFields - prefix - suffix - ci - di .json ](https :// github.com/mongodb/specifications/tree/master/source/client-side-encryption/etc/data/encryptedFields-prefix-suffix-ci-di.json).
38803880 This step requires server 9.0 .0 + .
3881+ - ` db.prefix-suffix-preview ` using the ` encryptedFields ` option set to the contents of
3882+ [encryptedFields - prefix - suffix - preview .json ](https :// github.com/mongodb/specifications/tree/master/source/client-side-encryption/etc/data/encryptedFields-prefix-suffix-preview.json).
3883+ This step requires server pre - 9.0 .0.
38813884- ` db.substring ` using the ` encryptedFields ` option set to the contents of
38823885 [encryptedFields - substring .json ](https :// github.com/mongodb/specifications/tree/master/source/client-side-encryption/etc/data/encryptedFields-substring.json)
38833886- ` db.substring-ci-di ` using the ` encryptedFields ` option set to the contents of
@@ -3947,7 +3950,8 @@ class EncryptOpts {
39473950}
39483951` ` `
39493952
3950- Use ` explicitEncryptedClient ` to insert the following document into ` db.prefix-suffix ` with majority write concern :
3953+ Use ` explicitEncryptedClient ` to insert the following document into ` db.prefix-suffix ` (if created ) and
3954+ ` db.prefix-suffix-preview ` (if created ) with majority write concern :
39513955
39523956` ` ` javascript
39533957{ "_id": 0, "encryptedText": <encrypted 'foobarbaz'> }
@@ -3980,15 +3984,20 @@ Use `explicitEncryptedClient` to insert the following document into `db.substrin
39803984
39813985#### Case 1 : can find a document by prefix
39823986
3983- This test case requires MongoDB server 9.0 .0 + and libmongocrypt 1.19 .0 + .
3987+ Run this case multiple times with the following sets of parameters :
3988+
3989+ - ` queryType=prefix ` and ` collection=prefix-suffix `
3990+ - Require server 9.0 .0 + and libmongocrypt 1.19 .0 + .
3991+ - ` queryType=prefixPreview ` and ` collection=prefix-suffix-preview `
3992+ - Require server pre - 9.0 .0 and libmongocrypt 1.19 .1 + .
39843993
39853994Use ` clientEncryption.encrypt() ` to encrypt the string ` "foo" ` with the following ` EncryptOpts ` :
39863995
39873996` ` ` typescript
39883997class EncryptOpts {
39893998 keyId : <key1ID>,
39903999 algorithm: "String",
3991- queryType: "prefix ",
4000+ queryType: "<queryType> ",
39924001 contentionFactor: 0,
39934002 stringOpts: StringOpts {
39944003 caseSensitive: true,
@@ -4001,7 +4010,7 @@ class EncryptOpts {
40014010}
40024011` ` `
40034012
4004- Use ` explicitEncryptedClient ` to run a " find" operation on the ` db.prefix-suffix ` collection with the following filter :
4013+ Use ` explicitEncryptedClient ` to run a " find" operation on the ` db.<collection> ` collection with the following filter :
40054014
40064015` ` ` javascript
40074016{ $expr: { $encStrStartsWith: {input: '$encryptedText', prefix: <encrypted 'foo'>} } }
@@ -4015,15 +4024,20 @@ Assert the following document is returned:
40154024
40164025#### Case 2 : can find a document by suffix
40174026
4018- This test case requires MongoDB server 9.0 .0 + and libmongocrypt 1.19 .0 + .
4027+ Run this case multiple times with the following sets of parameters :
4028+
4029+ - ` queryType=suffix ` and ` collection=prefix-suffix `
4030+ - Require server 9.0 .0 + and libmongocrypt 1.19 .0 + .
4031+ - ` queryType=suffixPreview ` and ` collection=prefix-suffix-preview `
4032+ - Require server pre - 9.0 .0 and libmongocrypt 1.19 .1 + .
40194033
40204034Use ` clientEncryption.encrypt() ` to encrypt the string ` "baz" ` with the following ` EncryptOpts ` :
40214035
40224036` ` ` typescript
40234037class EncryptOpts {
40244038 keyId : <key1ID>,
40254039 algorithm: "String",
4026- queryType: "suffix ",
4040+ queryType: "<queryType> ",
40274041 contentionFactor: 0,
40284042 stringOpts: StringOpts {
40294043 caseSensitive: true,
@@ -4036,7 +4050,7 @@ class EncryptOpts {
40364050}
40374051` ` `
40384052
4039- Use ` explicitEncryptedClient ` to run a " find" operation on the ` db.prefix-suffix ` collection with the following filter :
4053+ Use ` explicitEncryptedClient ` to run a " find" operation on the ` db.<collection> ` collection with the following filter :
40404054
40414055` ` ` javascript
40424056{ $expr: { $encStrEndsWith: {input: '$encryptedText', suffix: <encrypted 'baz'>} } }
@@ -4050,15 +4064,20 @@ Assert the following document is returned:
40504064
40514065#### Case 3 : assert no document found by prefix
40524066
4053- This test case requires MongoDB server 9.0 .0 + and libmongocrypt 1.19 .0 + .
4067+ Run this case multiple times with the following sets of parameters :
4068+
4069+ - ` queryType=prefix ` and ` collection=prefix-suffix `
4070+ - Require server 9.0 .0 + and libmongocrypt 1.19 .0 + .
4071+ - ` queryType=prefixPreview ` and ` collection=prefix-suffix-preview `
4072+ - Require server pre - 9.0 .0 and libmongocrypt 1.19 .1 + .
40544073
40554074Use ` clientEncryption.encrypt() ` to encrypt the string ` "baz" ` with the following ` EncryptOpts ` :
40564075
40574076` ` ` typescript
40584077class EncryptOpts {
40594078 keyId : <key1ID>,
40604079 algorithm: "String",
4061- queryType: "prefix ",
4080+ queryType: "<queryType> ",
40624081 contentionFactor: 0,
40634082 stringOpts: StringOpts {
40644083 caseSensitive: true,
@@ -4071,7 +4090,7 @@ class EncryptOpts {
40714090}
40724091` ` `
40734092
4074- Use ` explicitEncryptedClient ` to run a " find" operation on the ` db.prefix-suffix ` collection with the following filter :
4093+ Use ` explicitEncryptedClient ` to run a " find" operation on the ` db.<collection> ` collection with the following filter :
40754094
40764095` ` ` javascript
40774096{ $expr: { $encStrStartsWith: {input: '$encryptedText', prefix: <encrypted 'baz'>} } }
@@ -4081,15 +4100,20 @@ Assert that no documents are returned.
40814100
40824101#### Case 4 : assert no document found by suffix
40834102
4084- This test case requires MongoDB server 9.0 .0 + and libmongocrypt 1.19 .0 + .
4103+ Run this case multiple times with the following sets of parameters :
4104+
4105+ - ` queryType=suffix ` and ` collection=prefix-suffix `
4106+ - Require server 9.0 .0 + and libmongocrypt 1.19 .0 + .
4107+ - ` queryType=suffixPreview ` and ` collection=prefix-suffix-preview `
4108+ - Require server pre - 9.0 .0 and libmongocrypt 1.19 .1 + .
40854109
40864110Use ` clientEncryption.encrypt() ` to encrypt the string ` "foo" ` with the following ` EncryptOpts ` :
40874111
40884112` ` ` typescript
40894113class EncryptOpts {
40904114 keyId : <key1ID>,
40914115 algorithm: "String",
4092- queryType: "suffix ",
4116+ queryType: "<queryType> ",
40934117 contentionFactor: 0,
40944118 stringOpts: StringOpts {
40954119 caseSensitive: true,
@@ -4102,7 +4126,7 @@ class EncryptOpts {
41024126}
41034127` ` `
41044128
4105- Use ` explicitEncryptedClient ` to run a " find" operation on the ` db.prefix-suffix ` collection with the following filter :
4129+ Use ` explicitEncryptedClient ` to run a " find" operation on the ` db.<collection> ` collection with the following filter :
41064130
41074131` ` ` javascript
41084132{ $expr: { $encStrEndsWith: {input: '$encryptedText', suffix: <encrypted 'foo'>} } }
0 commit comments