summaryrefslogtreecommitdiff
path: root/jstests/core/geo_circle2a.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_circle2a.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_circle2a.js')
-rw-r--r--jstests/core/geo_circle2a.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/core/geo_circle2a.js b/jstests/core/geo_circle2a.js
index b084d1027ec..f647bdc82ea 100644
--- a/jstests/core/geo_circle2a.js
+++ b/jstests/core/geo_circle2a.js
@@ -6,7 +6,7 @@
var coll = db.geo_circle2a;
coll.drop();
coll.insert({p: [1112, 3473], t: [{k: 'a', v: 'b'}, {k: 'c', v: 'd'}]});
-coll.ensureIndex({p: '2d', 't.k': 1}, {min: 0, max: 10000});
+coll.createIndex({p: '2d', 't.k': 1}, {min: 0, max: 10000});
// Succeeds, since on direct lookup should not use the index
assert(1 == coll.find({p: [1112, 3473], 't.k': 'a'}).count(), "A");
@@ -18,7 +18,7 @@ coll.drop();
coll.insert({point: [1, 10], tags: [{k: 'key', v: 'value'}, {k: 'key2', v: 123}]});
coll.insert({point: [1, 10], tags: [{k: 'key', v: 'value'}]});
-coll.ensureIndex({point: "2d", "tags.k": 1, "tags.v": 1});
+coll.createIndex({point: "2d", "tags.k": 1, "tags.v": 1});
// Succeeds, since should now lookup multi-keys correctly
assert(2 == coll.find({point: {$within: {$box: [[0, 0], [12, 12]]}}}).count(), "C");
@@ -31,7 +31,7 @@ coll.drop();
coll.insert({point: [1, 10], tags: [{k: {'hello': 'world'}, v: 'value'}, {k: 'key2', v: 123}]});
coll.insert({point: [1, 10], tags: [{k: 'key', v: 'value'}]});
-coll.ensureIndex({point: "2d", "tags.k": 1, "tags.v": 1});
+coll.createIndex({point: "2d", "tags.k": 1, "tags.v": 1});
// Succeeds, should be able to look up the complex element
assert(1 ==