summaryrefslogtreecommitdiff
path: root/jstests/core/indexg.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/indexg.js')
-rw-r--r--jstests/core/indexg.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/jstests/core/indexg.js b/jstests/core/indexg.js
new file mode 100644
index 00000000000..a0709fd6568
--- /dev/null
+++ b/jstests/core/indexg.js
@@ -0,0 +1,13 @@
+
+f = db.jstests_indexg;
+f.drop();
+f.save( { list: [1, 2] } );
+f.save( { list: [1, 3] } );
+
+doit = function() {
+ assert.eq( 1, f.count( { list: { $in: [1], $ne: 3 } } ) );
+ assert.eq( 1, f.count( { list: { $in: [1], $not:{$in: [3] } } } ) );
+}
+doit();
+f.ensureIndex( { list: 1 } );
+doit(); \ No newline at end of file