summaryrefslogtreecommitdiff
path: root/jstests/core/query/ne/ne1.js
blob: 5069637eb30ee27299c03ad9b5738b53825b643b (plain)
1
2
3
4
5
6
7
8
9
10
t = db.ne1;
t.drop();

t.save({x: 1});
t.save({x: 2});
t.save({x: 3});

assert.eq(2, t.find({x: {$ne: 2}}).itcount(), "A");
t.createIndex({x: 1});
assert.eq(2, t.find({x: {$ne: 2}}).itcount(), "B");