title: Mongoose, Node JS, MongoDB and or query not working
body: <p>I'm running MongoDB version v3.6.8, Node v8.12.0 &amp; Mongoose v5.4.4.</p>
  
  <p>This purely OR query produces results:</p>
  
  <pre><code>db.messages.find( { $or : [ { senderId : "5c97ca3eed0cc17e8cfb0486" }, { receiverId : "5c8430effe7df210ee3264bf" } ] })
  </code></pre>
  
  <p>This AND OR query doesn't return any results:</p>
  
  <pre><code>db.messages.find( { $and : [ { $or : [ { senderId : "5c8430effe7df210ee3264bf" }, { receiverId : "5c97ca3eed0cc17e8cfb0486" } ] }, { $or : [ { senderId : "5c97ca3eed0cc17e8cfb0486" }, { receiverId : "5c8430effe7df210ee3264bf" } ] } ] } )
  </code></pre>
  
  <p>Although since it's an AND OR query if should return results because one OR query did. Am I missing something here? Is there a fault in my AND OR query? I went straight from the Mongo docs here: <a href="https://docs.mongodb.com/manual/reference/operator/query/and/" rel="nofollow noreferrer">https://docs.mongodb.com/manual/reference/operator/query/and/</a></p>
  
  <p>Any help would be much appreciated!</p>