diff options
-rw-r--r-- | jstests/core/timeseries/timeseries_text_geonear_disallowed.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/jstests/core/timeseries/timeseries_text_geonear_disallowed.js b/jstests/core/timeseries/timeseries_text_geonear_disallowed.js index 5c038066762..be0eb8bcd7c 100644 --- a/jstests/core/timeseries/timeseries_text_geonear_disallowed.js +++ b/jstests/core/timeseries/timeseries_text_geonear_disallowed.js @@ -8,7 +8,6 @@ * does_not_support_stepdowns, * requires_fcv_50, * requires_timeseries, - * requires_wiredtiger, * ] */ @@ -79,8 +78,12 @@ assert.commandFailedWithCode( // $text // Text indices are disallowed on collections clustered by _id. -assert.commandFailedWithCode(tsColl.createIndex({"tags.descr": "text"}), ErrorCodes.InvalidOptions); -// Since a Text index can't be created, a $text query should fail due to a missing index. -assert.commandFailedWithCode(assert.throws(() => tsColl.find({$text: {$search: "1"}}).itcount()), - ErrorCodes.IndexNotFound); +if (TimeseriesTest.supportsClusteredIndexes(db.getMongo())) { + assert.commandFailedWithCode(tsColl.createIndex({"tags.descr": "text"}), + ErrorCodes.InvalidOptions); + // Since a Text index can't be created, a $text query should fail due to a missing index. + assert.commandFailedWithCode( + assert.throws(() => tsColl.find({$text: {$search: "1"}}).itcount()), + ErrorCodes.IndexNotFound); +} })(); |