mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-2585 test
This commit is contained in:
parent
1df742557a
commit
8b35cf0f94
11
jstests/ork.js
Normal file
11
jstests/ork.js
Normal file
@ -0,0 +1,11 @@
|
||||
// SERVER-2585 Test $or clauses within indexed top level $or clauses.
|
||||
|
||||
t = db.jstests_ork;
|
||||
t.drop();
|
||||
|
||||
t.ensureIndex( {a:1} );
|
||||
t.save( {a:[1,2],b:5} );
|
||||
t.save( {a:[2,4],b:5} );
|
||||
|
||||
assert.eq( 2, t.find( {$or:[{a:1,$and:[{$or:[{a:2},{a:3}]},{$or:[{b:5}]}]},{a:2,$or:[{a:3},{a:4}]}]} ).itcount() );
|
||||
assert.eq( 1, t.find( {$or:[{a:1,$and:[{$or:[{a:2},{a:3}]},{$or:[{b:6}]}]},{a:2,$or:[{a:3},{a:4}]}]} ).itcount() );
|
Loading…
Reference in New Issue
Block a user