title: MongoDB distinct too big 16mb cap
body: <p>I have a Mongodb collection. Simply, it has two columns: user and url. It has 39274590 rows. The key of this table is {user, url}.</p>
  <p>Using Java, I try to list distinct urls:</p>
  <pre><code>  MongoDBManager db = new MongoDBManager( &quot;Website&quot;, &quot;UserLog&quot; );
    return db.getDistinct(&quot;url&quot;); 
  </code></pre>
  <p>But I receive an exception:</p>
  <pre><code>Exception in thread &quot;main&quot; com.mongodb.CommandResult$CommandFailure: command failed [distinct]: 
  { &quot;serverUsed&quot; : &quot;localhost/127.0.0.1:27017&quot; , &quot;errmsg&quot; : &quot;exception: distinct too big, 16mb cap&quot; , &quot;code&quot; : 10044 , &quot;ok&quot; : 0.0}
  </code></pre>
  <p>How can I solve this problem? Is there any plan B that can avoid this problem?</p>