Code question regarding the Atlas Search eWorkshop on Nov 29th

Hi, I participated in a german eworkshop on atlas search on Nov 29th. This github repo was used. I’m trying to understand it better by writing the functions in node, here’s the repo. It works quite well, but there is one thing I don’t understand: If I run the function filteredMovies (line 138-142) and term is an empty string, I get this error

Error connecting to the database: MongoServerError: PlanExecutor error during aggregation :: caused by :: Remote error from mongot :: caused by :: Highlights cannot be generated. Path: “title” is not stored statically or dynamically indexed.

  1. What exactly caused the error?
  2. As I understand the app now, it doesn’t use the same searchQuery when term is empty. Instead it filters with genre and/or country and shows up to 50 movies with the highest imdb rating. But I don’t understand how it works. It’s also because I don’t know GraphQL. How is it done in the next app? And how could I change my code to do it?

And two more questions…

  1. Can I use REST endpoints instead of GraphQL in the App Service? If yes, is graphQL better and why?
  2. There was no video recording of this workshop. Is there a recording of another workshop on the same topic?