title: Mongo array query with $and, $or
body: <p>Is it possible to use <code>$and</code> and <code>$or</code> logical operators when querying array?</p>
  
  <p>Because when I create a collection with 2 documents</p>
  
  <pre><code>db.inventory.insertMany([
    { item: "planner", qty: 75, tags: ["blank", "red"], dim_cm: [ 25 ] },
    { item: "postcard", qty: 45, tags: ["blue"], dim_cm: [ 10, 50 ] }
  ]);
  </code></pre>
  
  <p>and query</p>
  
  <pre><code>db.inventory.find( { dim_cm: {$or: [ {$gt: 49}, {$size: 1} ] }  }  )
  </code></pre>
  
  <p>the result is error <code>unknown operator $or</code>.</p>
  
  <p>I can rewrite the query as</p>
  
  <pre><code>db.inventory.find( { $or: [{dim_cm: {$gt: 49}}, {dim_cm: {$size: 1}}] } )
  </code></pre>
  
  <p>but why isn't the first query variant valid?</p>