title: Mongoose find() with multiple criteria
body: <p>I am trying to find in my database (MongoDB) all the data records satisfying all the criteria that are defined (some might be undefined). I am using NodeJs as a server and mongoose to connect to the database.</p>
  
  <p>For example, my database contains the following records:</p>
  
  <p>Database Name: Movie</p>
  
  <pre><code>{title: 'A' , main_actor, 'A.A.'},
  {title: 'B' , main_actor, 'B.B.'},
  {title: 'C' , main_actor, 'A.A.'}.
  </code></pre>
  
  <p>If my request contains the following:</p>
  
  <ul>
  <li>title = 'A' and   </li>
  <li>main_actor is undefined</li>
  </ul>
  
  <p>and I do the following query: </p>
  
  <pre><code>Movie.find(title: title, main_actor: main_actor, .....) 
  </code></pre>
  
  <p>the response is an empty array while I would like to get </p>
  
  <pre><code>{title: 'A' , main_actor, 'A.A.'}
  </code></pre>
  
  <p>What is the best way to find all the record either by 'movie' only, 'main_actor' only, 'movie' and 'main_actor'? In other word is there a way to ignore one or more fields if the searching criteria are undefined (I would like to avoid doing something like this: </p>
  
  <pre><code>if (criteria1 &amp; !criteria2) { ...find(criteria1....)} 
  if (!criteria1 &amp; criteria2) { ...find(criteria2....)} 
  if (criteria1 &amp; criteria2) { ...find(criteria1,criteria2....)} 
  </code></pre>