The following error is returned if you run $search queries when the Atlas Search mongot process isn’t installed or running:
MongoError: Remote error from mongot :: caused by :: Error connecting to localhost:28000.
The mongot process is installed only when the first Atlas Search index is defined. If you don’t have any Atlas Search index in your Atlas cluster, create at least one Atlas Search index to resolve this error.
To learn how to create Atlas Search Index, please refer