summaryrefslogtreecommitdiff
path: root/jstests/core/indexg.js
blob: f4b2e0cada147a5fb819bd20effce3b14f106aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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();