Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

SERVER-2585 test

  • Loading branch information...
commit 8b35cf0f945c5636df17709bf03a03f63217273f 1 parent 1df7425
astaple astaple authored

Showing 1 changed file with 11 additions and 0 deletions. Show diff stats Hide diff stats

  1. +11 0 jstests/ork.js
11 jstests/ork.js
... ... @@ -0,0 +1,11 @@
  1 +// SERVER-2585 Test $or clauses within indexed top level $or clauses.
  2 +
  3 +t = db.jstests_ork;
  4 +t.drop();
  5 +
  6 +t.ensureIndex( {a:1} );
  7 +t.save( {a:[1,2],b:5} );
  8 +t.save( {a:[2,4],b:5} );
  9 +
  10 +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() );
  11 +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() );

0 comments on commit 8b35cf0

Please sign in to comment.
Something went wrong with that request. Please try again.