Lab 4.2: Aggregation Performance - Index Drop


With this lab im trying to drop all indexes, except the _id one of course, I understand that can’t be deleted.

The query I run after this point, doesn’t give an error, but it also doesn’t provide any results.
… where as, a basic find provides a list of data

I am running this on a localhost instance of mongo db.


Dropping an index show not change the list of documents found. It will be slower.

If you have no result then

  1. connected to the wrong server
  2. using the wrong database
  3. specify the wrong collection
  4. specify the wrong query

The right server and the right DB. The queries I specified were those on the web page.

Is it an issue im using a local mongo db? should I use it in Mongo Atlas

If you do not have the same data as on the web page it is normal that the queries do not work.

Collection name is wrongly spelled in the course material! which is the the problem. Thats the collection name used in the query which should error!

Hi @Russell_Smithers_CORP,

The collection used in the Lab is restaurants. You will need to download the dataset from the handout and import the sam to run queries and create Index.

I hope I have got your question right. If you are still facing any issues, please share the commands that you are running and the error messages.

Kind Regards,

Hello Sonali,

Im sorry but you really do not understand. The problem is that the lab exercise has a spelling mistake in it.

I got everything working already and finished the course.

Look carefully at the lab (copy/past query) and the collection name. You will see there is an ‘m’ instead of an ‘n’.

It would be worth fixing the spelling mistake. It causes a subtle error for those who use the “copy” option. For those who just type by hand and know how to spell restaurant will not see an issue.

Kind Regards

Hi @Russell_Smithers_CORP,

It would be great if you can share the screenshot of the spelling error. It will be easier for me to update the error then.

Kind Regards,