Lab 4.2 went incorrect inspite mentioning the correct answer

I did specify both of the below listed answers

db.restaurants.createIndex( {stars:1})
db.restaurants.createIndex( {stars:1}, { partialFilterExpression: { stars: { $gt: 2 } } } )

first one is 6 mb approx and next one is less than 4 mb, both of the indexes were able to get the answers, but it did not accept any of the answers, i lost the LAB now… ,

seems like the correct answer is one of my answers,
db.restaurants.createIndex({ stars: 1 })

Please kindly let me know how to get the Lab answer rectified …


To get credit for an answer, you need to follow the directions exactly. Notice in particular that the format for the answer must be

For example, if you ran db.restaurants.createIndex({ foobar: 1 }) to fix the error, then you'd enter { foobar: 1 } into the text box.

The answers are handled by a script, and like most computer-generated stuff, it really needs things in the exact expected format. Sorry, I can’t change what you’ve got. Better luck next time.

I inserted { < deleted > } as index. The result as market as incorrect. Why?


First of all, notice that you are replying to a Post that was marked solved and closed over two months ago. If you want a reply, you will do best if you open a new Post.

Second, please follow Forum guidelines and do not post answers, code, or potential answers in the Forum. I have edited your post to remove that. Thanks.

And when you say you “inserted” the index, what exactly do you mean? If you can clarify this in a new post with more information – and not any details on what you entered – we’ll try to help. Good luck.