title: Copy documents from one collection to another in MongoDB via Java API
body: <p>I have two collections, 'recruits' and 'items'.  I gather documents in 'recruits', perform some calculations, and want to move the documents that meet my criteria to the 'items' collection.  I know that in the shell, I could use db.cloneCollection(), passing in my query as a parameter.  However, I need to do this programmatically, from the Java API.  I cannot use the $out operator for aggregation, as I need to insert into the collection, not replace it.  I'm not psyched about using map-reduce, as the times I've tried to use it in the past, it doesn't behave as I expect.</p>
  
  <p>Is there a better option than iterating over the result of my find() and inserting the documents?   Can anyone explain why cloneCollection() is not available in the Java API?</p>
  
  <p>Thank you!</p>