title: How can i get distinct in MongoDB from subset of records not from the collection?
body: <p>I know &amp; use this: (i'm using PHP)</p>
  
  <pre><code>$db-&gt;command(array('distinct' =&gt; 'cars', 'key' =&gt; 'manufacturer'));
  </code></pre>
  
  <p>But this gives me distinct car models in the whole collection.</p>
  
  <p>What i want to do is specify for instance <strong>Honda cars</strong> and get their distinct models.</p>
  
  <p>Something like:</p>
  
  <pre><code>$db-&gt;find(array('manifacturer' =&gt; 'Honda'))-&gt;distinct('model')
  </code></pre>
  
  <p>I unserstand that the syntax is wrong, but i cannot find any good way to do it. I have really big collection and after processing the data is a bad solution.</p>
  
  <p>Any ideas ?</p>