mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
13 lines
267 B
JavaScript
13 lines
267 B
JavaScript
|
|
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(); |