What does a MongoDB collection consist of? June 25, 2021June 25, 2021 Team PaTeam Pa 0 Comment MongoDB LinkedIn Assessment Questions and Answers data documents fields rows Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. Post navigation Previous Post Previous Post Next Post Next Post
Assuming you have customers collection with a firstName and lastName field, which is the correct MongoDB shell command to create an index on lastName, then firstName both ascending?Assuming you have customers collection with a firstName and lastName field, which is the correct MongoDB shell command to create an index on lastName, then firstName both ascending? db.customers.createIndex(“lastName, firstName, ASC”) db.customers.addIndex({lastName:”ASC”, firstName: “ASC”}) db.customers.newIndex({lastName:1, firstName:1}) db.customers.createIndex({lastName:1, firstName: 1})[...] READ MOREREAD MORE
You have two text fields in your document and you’d like both to be quickly searchable. What should you do?You have two text fields in your document and you’d like both to be quickly searchable. What should you do? Create a text index on each field. MongoDB is not able to do this. Create a compound text index using[...] READ MOREREAD MORE
Given a cursor named myCursor, which command returns a boolean value?Given a cursor named myCursor, which command returns a boolean value? myCursor.hasNext() myCursor.sort() myCursor.next() myCursor.find()[...] READ MOREREAD MORE