summaryrefslogtreecommitdiff
path: root/jstests/core/wildcard_index_dedup.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/wildcard_index_dedup.js')
-rw-r--r--jstests/core/wildcard_index_dedup.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/jstests/core/wildcard_index_dedup.js b/jstests/core/wildcard_index_dedup.js
index 4fd5bf5df8e..093d3e9d219 100644
--- a/jstests/core/wildcard_index_dedup.js
+++ b/jstests/core/wildcard_index_dedup.js
@@ -5,24 +5,24 @@
* scanned and return only a single object.
*/
(function() {
- "use strict";
+"use strict";
- const coll = db.wildcard_index_dedup;
- coll.drop();
+const coll = db.wildcard_index_dedup;
+coll.drop();
- assert.commandWorked(coll.createIndex({"$**": 1}));
+assert.commandWorked(coll.createIndex({"$**": 1}));
- assert.commandWorked(coll.insert({a: {b: 1, c: {f: 1, g: 1}}, d: {e: [1, 2, 3]}}));
+assert.commandWorked(coll.insert({a: {b: 1, c: {f: 1, g: 1}}, d: {e: [1, 2, 3]}}));
- // An $exists that matches multiple $** index paths from nested objects does not return
- // duplicates of the same object.
- assert.eq(1, coll.find({a: {$exists: true}}).hint({"$**": 1}).itcount());
+// An $exists that matches multiple $** index paths from nested objects does not return
+// duplicates of the same object.
+assert.eq(1, coll.find({a: {$exists: true}}).hint({"$**": 1}).itcount());
- // An $exists that matches multiple $** index paths from nested array does not return
- // duplicates of the same object.
- assert.eq(1, coll.find({d: {$exists: true}}).hint({"$**": 1}).itcount());
+// An $exists that matches multiple $** index paths from nested array does not return
+// duplicates of the same object.
+assert.eq(1, coll.find({d: {$exists: true}}).hint({"$**": 1}).itcount());
- // An $exists with dotted path that matches multiple $** index paths from nested objects
- // does not return duplicates of the same object.
- assert.eq(1, coll.find({"a.c": {$exists: true}}).hint({"$**": 1}).itcount());
+// An $exists with dotted path that matches multiple $** index paths from nested objects
+// does not return duplicates of the same object.
+assert.eq(1, coll.find({"a.c": {$exists: true}}).hint({"$**": 1}).itcount());
})(); \ No newline at end of file