Searching for a Movie

Learn how to retrieve only one record based on a movie name from MongoDB.

Searching for a specific movie

With this feature, users can use a movie name to search for movies that need to be reviewed. The system receives the movie name, searches the database, and then returns either the movie with that title or the movie with the search parameter as its content.

Setting up the controller

We need to set up a controller to interact with the service, router, and database. The SearchMovieByQuery() controller returns movies with the search parameter in their name. If there’s no movie with that name, we notify the user that their search index is void.

Get hands-on with 1400+ tech skills courses.