title: Delete 10 % of old Object in MongoDB collection
body: <p>I want to delete 10 % of Objects for example.</p>
  
  <p>I get the collection and sort it by time. Now I have an iterator. I want to say remove, but it doesn't work. Clear doesn't work. How can I delete only the first Objects?</p>
  
  <p>Try1</p>
  
  <pre><code>MongoCursor&lt;Document&gt; cursor = collection.find().sort(new BasicDBObject("utc-stamp", 1)).iterator();
          while (cursor.hasNext()) {
              Document document = (Document) cursor.next();
              document.clear();
  
          }
  </code></pre>
  
  <p>Try 2</p>
  
  <pre><code>MongoCursor&lt;Document&gt; iterator = collection.find().sort(new BasicDBObject("utc-stamp", 1)).iterator();
  for(int i = 0; i&lt; collection.count()-2; i++) {
      iterator.next().clear();
  }
  while (iterator.hasNext()) {
      docs.add(iterator.next());
  }
  </code></pre>
  
  <p>I have no Idea. I can get the name of collection and the size of objects.</p>
  
  <p>I hope you can help me.</p>