summaryrefslogtreecommitdiff
path: root/jstests/core/geo_big_polygon3.js
diff options
context:
space:
mode:
authorRishab Joshi <rishab.joshi@mongodb.com>2020-11-17 13:45:05 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-17 14:23:10 +0000
commit4329ffafa3ef2f9ea40b7ff17a6af8604720de12 (patch)
tree44cad61cfcdb57abccc910e49fa20f4c6fcc81f2 /jstests/core/geo_big_polygon3.js
parent519bc2b24ecc6c29f2483c8b82786e16f61c2cba (diff)
downloadmongo-4329ffafa3ef2f9ea40b7ff17a6af8604720de12.tar.gz
SERVER-50442 Remove ensureIndex shell function
This commit replaces all the usages of ensureIndex() with createIndex() in JS tests and JS shell""
Diffstat (limited to 'jstests/core/geo_big_polygon3.js')
-rw-r--r--jstests/core/geo_big_polygon3.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/core/geo_big_polygon3.js b/jstests/core/geo_big_polygon3.js
index a55ce87c3d6..cd4591dd66a 100644
--- a/jstests/core/geo_big_polygon3.js
+++ b/jstests/core/geo_big_polygon3.js
@@ -63,7 +63,7 @@ var bigPoly = {
};
// 2dsphere index required
-assert.commandWorked(coll.ensureIndex({geo: "2dsphere"}), "2dsphere index");
+assert.commandWorked(coll.createIndex({geo: "2dsphere"}), "2dsphere index");
// $nearSphere on big polygon should fail
assert.throws(function() {
@@ -222,7 +222,7 @@ assert.eq(totalDocs,
"crs84CRS or epsg4326CRS intersects");
// Add index and look again for stored point & spherical CRS documents
-assert.commandWorked(coll.ensureIndex({geo: "2dsphere"}), "2dsphere index");
+assert.commandWorked(coll.createIndex({geo: "2dsphere"}), "2dsphere index");
assert.eq(totalDocs,
coll.count({geo: {$geoWithin: {$geometry: poly}}}),