InterviewSolution
Saved Bookmarks
| 1. |
Which shards would be involved in answering the following query: |
|
Answer» The FIRST part of the query WOULD give all documents where y>=10. So we will have 2 documents i.e d> { "_id" : 4, "x" : 4, "y" : 10 } e> { "_id" : 5, "x" : 5, "y" : 75 }Now the second part of the query would update the value of Y for above 2 documents to 75, but we already have a document with value y:75, that will not be updated. Finally, we will have one 1 document that will be updated by the provided query. d> { "_id" : 4, "x" : 4, "y" : 10 } |
|