M121 Chapter 3 lab the aggregate movies DB

The movies database does not contain an awards field. How do I get it

{
   "_id":{
      "$oid":"573a1390f29313caabcd4cf1"
   },
   "title":"Ingeborg Holm",
   "year":1913,
   "runtime":96,
   "released":{
      "$date":"1913-10-27T00:00:00.000Z"
   },
   "cast":[
      "Hilda Borgstr�m",
      "Aron Lindgren",
      "Erik Lindholm",
      "Georg Gr�nroos"
   ],
   "poster":"http://ia.media-imdb.com/images/M/MV5BMTI5MjYzMTY3Ml5BMl5BanBnXkFtZTcwMzY1NDE2Mw@@._V1_SX300.jpg",
   "plot":"Ingeborg Holm's husband opens up a grocery store and life is on the sunny side for them and their three children. But her husband becomes sick and dies. Ingeborg tries to keep the store, ...",
   "fullplot":"Ingeborg Holm's husband opens up a grocery store and life is on the sunny side for them and their three children. But her husband becomes sick and dies. Ingeborg tries to keep the store, but because of the lazy, wasteful staff she eventually has to close it. With no money left, she has to move to the poor-house and she is separated from her children. Her children are taken care of by foster-parents, but Ingeborg simply has to get out of the poor-house to see them again...",
   "lastupdated":"2015-08-25 00:11:47.743000000",
   "type":"movie",
   "directors":[
      "Victor Sj�str�m"
   ],
   "writers":[
      "Nils Krok (play)",
      "Victor Sj�str�m"
   ],
   "imdb":{
      "rating":7,
      "votes":493,
      "id":3014
   },
   "countries":[
      "Sweden"
   ],
   "genres":[
      "Drama"
   ]
}

It looks like you are confusing the database name with the collection name. For M121, the database is aggregations as indicated in the first few lessons. In this case, movies is a collection within the aggregations database.

Some documents might not have a field named awards.

Thank you for your answer but it does not change the fact the in the database aggregations the collection movies does not contain the awards field. I’m in chapter 3 so that means I went through chapter 1 and 2

Here is my mongodb compass connection string.

mongodb://m121:aggregations@cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/aggregations?authSource=admin&replicaSet=Cluster0-shard-0&readPreference=primary&appname=MongoDB%20Compass&ssl=true

Thank you
Meir

The following was important from my previous post:

If you use the query

{awards: {$exists: true}}

you will find documents with the requested field.

1 Like

Thank you , I was under the impression that awards was an object with a .text as in awards.text I used the mflix_sample collection as a reference. That’s why I couldn’t find any. Now I see the awards as just a text field.

Thank again.

Meir