Module Assessment | Yext Hitchhikers Platform

loading
You must include a first name and last name in your profile to create challenge environments.

Background

Some customers have said they have had trouble finding your locations online. To fix this, you want a Search experience that returns one of your restaurants every time a customer searches for a location. To do this, you’ll create a new Search experience for your Restaurant and Event verticals.

You notice that a search for “restaurant” returns results, but terms like “location” or “food joint” do not. You will add a synonym for “location” → “restaurant” in the UI. Then you’ll add a synonym for “food joint” → “restaurant” in the JSON editor. You’ll learn more about synonyms later, but for now we want to give you practice editing the Search configuration.

You’ll also update the configuration labels, so you can fully test these new changes before you deploy to production.

Your Challenge

  1. Navigate to Search and click on the All Search Experiences screen.
  2. Click Add Experience. Enter the experience name as “Brand Search” (this is case sensitive!). The experience key will automatically fill in as “brand-search”. Click Save.
  3. Once the experience is created, you’ll be dropped on the Verticals screen. Add two verticals:
    1. Restaurants
      • Vertical Name: “Restaurants” (the vertical key will automatically fill in)
      • Entity Type: Restaurant
      • Click Save and Configure. Notice there are some fields configured already.
    2. Events
      • Vertical Name: “Events” (the vertical key will automatically fill in)
      • Entity Type: Event
      • Click Save and Configure. Notice there are some fields configured already.
  4. Try out a few queries in the Test Search:
    1. Search for “restaurant”. Notice no results are returned. This is because we haven’t told the algorithm to search on the name of the entity type yet.
    2. Search for “event”. Notice only one result is returned, even though you have many events. Similarly, we haven’t told the algorithm to search on the name of the entity type yet. This entity has the word “event” in the name, which is enabled with keyword search.
  5. Make the entity type searchable for both the Restaurants and Events verticals.
    1. Click into the vertical and navigate to the Filters tab.
    2. Under Inferred Filters, click + Add/Update Fields.
    3. Check off the box next to “Entity Type builtin.entityType” (use the search bar if needed).
    4. Click Update and then Save the configuration.
    5. Navigate to the other vertical and repeat.
  6. Use Test Search to run the queries again:
    1. Search for “event”. Notice more results are now returned.
    2. Search for “restaurant”. Notice there are now results returned.
    3. Search for “location”. Notice how nothing is returned. This is because we need to train the system to know that “location” is the same as “restaurant”.
    4. Search for “food joint”. Notice how only an event is returned. This is because we need to train the system to know that “food joint” is the same as “restaurant”.
  7. Navigate to Synonyms under the Configuration section.
  8. Click + Add One Way Synonym.
  9. Enter the phrase “location” and synonym “restaurant”. Then click Save.
  10. Run a test search for “location” in the right panel. You should now see restaurants returned! Adding “location” as a synonym for “restaurant” helps the Search algorithm know that for this search experience it should treat the word “location” the same as it treats the word “restaurant”.
  11. Now we’ll add a synonym in the JSON editor. Navigate to the Edit as JSON screen.
  12. Scroll to the synonyms object (or click into the JSON editor and then use CTRL+F).
  13. You’ll see the oneWay array with an object for the synonym you just added with the phrase “location” and synonym “restaurant”. Since we need to use this structure to specify a new one way synonym, copy the object (including the brackets { }), add a comma after the closing bracket (}), press enter, and then paste the second one way synonym object.
  14. Change the phrase to “food joint”. You can leave the synonym as “restaurant”. The final synonyms object should look like:

      "synonyms": {
        "oneWay": [
          {
            "phrase": "location",
            "synonyms": [
              "restaurant"
            ]
          },
          {
            "phrase": "food joint",
            "synonyms": [
              "restaurant"
            ]
          }
        ],
        "synonymSet": [],
        "normalization": []
      },
  15. Click Save.

  16. In Test Search, run the same queries again for “restaurant”, “location”, and “food joint”. Notice how all three queries now have results and match on the entity type “Restaurant”.

  17. Change the configuration label in Test Search to PRODUCTION and run the three queries again. Once again you get no results for “location” and “food joint” because now you’re running the search queries on a configuration version before you added the synonyms. This is a great way to compare results with and without a particular change.

Module Assessment
+<% util.points %> points
loading
Weekly Challenge Streak Weekly Challenge Streak: <% util.streakWeekly %>
You must include a first name and last name in your profile to create challenge environments.
Challenge account expires in <% util.expirationHours > 24 ? Math.round((util.expirationHours * 1.0) / 24) : util.expirationHours %> <% util.expirationHours > 24 ? (Math.round((util.expirationHours * 1.0) / 24) == 1 ? 'day' : 'days') : (util.expirationHours == 1 ? 'hour' : 'hours') %>.
Challenge account has expired. Please create a new account.
Report Card
Add a synonym from location to restaurant
Add a synonym from food joint to restaurant
Previous Submissions
Attempt #<% submission.attemptNumber %>
<% submission.date %>
Score: <% submission.numericScore %>
Pending
Feedback