title: What are the advantages of using db.collection.createIndex() rather than db.collection.ensureIndex()
body: <p>As mentioned in title, I can see it is told by official MongoDB doc <a href="http://docs.mongodb.org/manual/reference/method/db.collection.ensureIndex/" rel="nofollow">here</a> </p>
  
  <p>,but it doesn't tell us why we should do it this way to create an index in MongoDB.</p>