MongoDB shell is showing "..." after entering a query to find a document

db.movieDetails.find({rated: 'PG'}

^^^ that’s the query I’m using and when I press enter in the shell it shows 3 dots. Does this mean it is loading?

No
Please check your syntax.I see its incomplete
Usually you get that if something wrong with your query
It should give results immediately

Hi @Benjamin_N_Wofford_92212,

As @Ramachandra_37567 mentioned, your syntax is incomplete. The three dots is appearing because of this reason only.

It is missing the closing bracket “)” .

Please feel free to get back to us if you have any query.

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Hi
i am also trying to find collections through find() command but its not showing anything and i connected to class cluster after that i switched db to viedo and i entered in command shell like db.movies.find({mpaarating: “PG-13”}).pretty() but i am not seeing anything please guide.
below i am posting the screenshot also

also i tried in anothre cluster which is cluster0 but i am facing the same issue

@venkata_97387

For the first issue, it should be mpaaRating not mpaarating.

For the second issue, the current db is viedo, but it looks like you should be using video.

thank you the first one working with mpaaRating,
but for the second one

There is a typo
It should be video

Run show dbs
then switch to your desired db by use dbname

Also you are trying to connect to your cluster while connected to mongo prompt
Please exit and try from your os prompt

Hi @venkata_97387,

I hope you found @Ramachandra_37567 and @Jason_67645’s response helpful.

Run this command to switch to the correct database i.e. video.

use video

Please let me know if you are still having any issue.

Thanks,
Shubham Ranjan
Curriculum Services Engineer

1 Like