In Campass, it uses wildcard index, but why does it return 0 result?

{“waveMeasurement.seastate.quality”: 9}

while clearly there is a document with the following _id

“_id”: “5553a998e4b02cf7151190c6”

https://university.mongodb.com/mercury/M201/2022_September_20/chapter/Chapter_2_MongoDB_Indexes/lesson/5cf976dc7df3b5deb6031df1/lecture

around 0:49

{“waveMeasurement.seaState.quality”: “9”}

the instructor incorrectly spelled it.

You are correct. MongoDB is case sensitive. The instructor also searched for a numeric value instead of a string value. Unlike some other database platforms which will do implicit datatype conversions, MongoDB will not and matches based on the datatype asked for.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.