Exercises
Exercise 1
Using restaurants
Build a text index to the 'name' field.
Find restaurants whose names include 'Kyochon‘ Use text index
Print only borough and name fields
Exercise 2
Take a look the index information in map and countries collections.
Find universities in Korea.
Get geometry information in the countries collection.
keyword -properties.admin: “South Korea”
Return ten documents with sorting by “properties.name”, and show the name only.
Note that there is no ‘properties.name’ in a document; therefore, remove the document.
Search the ‘properties.name’ that includes ‘서울대입구’
Using regular expression ($regex) or a text index.
Sort properties.name in ascending order and display only a name field as below.
Last updated