MongoDB Atlas Search

MongoDB Atlas Search


Atlas Search allows you to quickly and easily add a search feature to your application. Search can be tricky to tackle, especially if you have a lot of data that you need to sort and filter quickly. MongoDB Atlas has a built-in tool that allows you to add search functionality to your application, and customize the users’ results with weighted values, analyzers, and groupings. This unit will show you how to use Atlas Search to customize your searches.

Lesson 01: Using Relevance-Based Search and Search Indexes

  1. Which type of search is depicted in the image below? (Select one.)

    A. Database Search

    B. Relevance-based search in an application

  2. What type of index is written below? (Select one.)

       "analyzer": "lucene.standard",
       "searchAnalyzer": "lucene.standard",
       "mappings": {
         "dynamic": true

    A. A search index

    B. A database index

Lesson 02: Creating a Search Index with Dynamic Field Mapping

  1. When using a dynamic index, which fields does an Atlas Search query against? (Select one.)

    A. Just the fields that the user selects.

    B. All of the fields, not including nested fields.

    C. All of the fields including nested fields.

  2. When would you use a dynamically mapped search index? (Select one.)

    A. When you want to search within three specific fields.

    B. When you want to search for names.

    C. When you want to search all of the fields with equal weight.

    D. When you want to search all of the fields, but one of them should be weighted more heavily than the rest.

Lesson 03: Creating a Search Index with Static Field Mapping

  1. If the search index is statically mapped and the only field mapping is for the "storeLocation" field, and you searched for one of the items sold by the office supply company, notepads, how many results will come up? (Select one.)

    A. All of the records with "notepads" in any of the fields

    B. All of the records with "notepads" in any of the fields, but they will have very low relevance scores

    C. None

    D. 20 because of the result limit

  2. The following code is a snippet from a search index. What type of field mapping does this search index use? (Select one.)

         "mappings": {
             "dynamic": false,
             "fields": {
                 "common_name": [
                     "dynamic": true,
                     "type": "document"
                     "type": "string"

    A. Dynamic Mapping

    B. Static Mapping

    C. Compound Operator Mapping

Lesson 04: Using $search and Compound Operators

  1. What does the “filter” clause do? (Select one.)

    A. It returns results that match the clause.

    B. It eliminates results that match the clause.

    C. It scores results that match the clause.

  2. Which clauses used by the compound operator contribute to the score given the results? (Select one.)

    A. "must", "must not", "should", and "filter"

    B. "must", "should", and "filter"

    C. "must", "must not", "should", and "should not"

    D. "must", "must not", and "should"

Lesson 05: Grouping Search Results by Using Facets

  1. If you want to view the metadata (facets and their count) for Atlas Search, which aggregation stage must you use? (Select one.)

    A. $match

    B. $searchMeta

    C. $group

    D. $search

  2. Which operator can you use to group Atlas search results? (Select one.)

    A. $group

    B. filter

    C. must

    D. facet