I am trying to retrieve values of _id for inserted documents after successful InsertMany operation. To achieve this I am using InsertManyResult.getInsertedIds(). While this approach works most of the time there are cases where not all _id values are retrieved. I am not sure if I am doing something wrong but I would assume that InsertManyResult.getInsertedIds() returns _id for all
Tag: mongo-java
Check the index creation progress in mongo DB using java driver
I have around 10 millions of data in MongoDB. There is a requirement to add a new compound index. I used the following code to create the index. Using ensureIndex with option creation in background. My question is how do I track the index creation progress. There are other sets of operations I need to do after confirming the Index