summaryrefslogtreecommitdiff
path: root/jstests/core/proj_key1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/proj_key1.js')
-rw-r--r--jstests/core/proj_key1.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/core/proj_key1.js b/jstests/core/proj_key1.js
index 51ca23d0c37..af6d6d9d9fe 100644
--- a/jstests/core/proj_key1.js
+++ b/jstests/core/proj_key1.js
@@ -13,7 +13,7 @@ for (i = 0; i < 10; i++) {
t.insert({a: i, b: i});
}
-t.createIndex({a: 1});
+t.ensureIndex({a: 1});
assert.eq(as, t.find({a: {$gte: 0}}, {a: 1, _id: 0}).sort({a: 1}).toArray());
assert.eq(as, t.find({a: {$gte: 0}}, {a: 1, _id: 0}).sort({a: 1}).batchSize(2).toArray());