summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2021-05-05 17:54:00 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-05 22:35:08 +0000
commitaa394f2e69b756b6ebc92bb842f828ec14334f49 (patch)
treed02605d708357deaf6aab59a25ec16b56646f0ae /jstests
parentfc2ca349e6a97357b95dd0769d19f6628d5e667a (diff)
downloadmongo-aa394f2e69b756b6ebc92bb842f828ec14334f49.tar.gz
SERVER-56513 fix FTSSpec::fixSpec() to handle int values in key patterns that are out of bounds
Diffstat (limited to 'jstests')
-rw-r--r--jstests/core/fts_index.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/core/fts_index.js b/jstests/core/fts_index.js
index 5331d44992d..d02c3c41458 100644
--- a/jstests/core/fts_index.js
+++ b/jstests/core/fts_index.js
@@ -224,3 +224,14 @@ assert.commandFailedWithCode(coll.createIndex({a: 1, c: 1}, {weights: "$foo"}),
coll.getIndexes();
coll.drop();
+
+//
+// 6. Bad direction value for non-text key in compound index.
+//
+assert.commandFailedWithCode(coll.createIndex({a: "text", b: Number.MAX_VALUE}),
+ ErrorCodes.CannotCreateIndex);
+assert.commandFailedWithCode(coll.createIndex({a: "text", b: -Number.MAX_VALUE}),
+ ErrorCodes.CannotCreateIndex);
+coll.getIndexes();
+
+coll.drop();