title: Mongodb query getting slow even after indexing
body: <p>I have a collection let's say Fruits in db. which has following fields</p>
  <pre><code>{
   &quot;_id&quot;: ObjectId(...),
   &quot;item&quot;: &quot;Banana&quot;,
   &quot;category&quot;: [&quot;food&quot;, &quot;produce&quot;, &quot;grocery&quot;],
   &quot;location&quot;: &quot;4th Street Store&quot;,
   &quot;stock&quot;: 4,
   &quot;type&quot;: &quot;cases&quot;
  }
  </code></pre>
  <p>There is an index by default on _id, and i added another index which is,</p>
  <pre><code>{
   &quot;item&quot;: &quot;1&quot;,
   &quot;category&quot;: &quot;1&quot;,
   &quot;stock&quot;: &quot;1&quot;,
   &quot;type&quot;: &quot;1&quot;
  }
  </code></pre>
  <p>this collection has data of thousands , and my query response is slow. My query is.</p>
  <blockquote>
  <p>After the index which I mentioned above, Do I need to add all these
  checks in my query or I can use any on the keys added in the index ?</p>
  </blockquote>
  <p>Like, currently my queries are like</p>
  <pre><code>fruits.find({item: 'new'});
  fruits.find({item: 'new', category: 'history'});
  fruits.find({stock: '5', category: 'drama'});
  fruits.find({type: 'new'});
  </code></pre>
  <blockquote>
  <p>Is my index which has all these keys is enough for this or I need to
  created different indexes for all these combination of keys which I
  mentioned above?</p>
  </blockquote>
  <p>Sometimes I am using query and sometimes I am using aggregation on some other collections and lookup for this fruits collections and then doing search etc..</p>