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 Create Search Experience. Enter the experience name as “Brand Search” (this is case sensitive!). The experience key will automatically fill in as “brand-search”. Click Continue.
  3. For the entity types, only select Restaurants and Events. Then click Create Experience.
  4. Once the experience is created, you’ll be dropped on the Home screen. Try out a few queries in the full screen Test Search:
    1. Search for “restaurant”. Notice there are results returned.
    2. 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”.
    3. 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”.
  5. Navigate to Synonyms under the Configuration section.
  6. Click + Add One Way Synonym.
  7. Enter the phrase “location” and synonym “restaurant”. Then click Save.
  8. 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”.
  9. Now we’ll add a synonym in the JSON editor. Navigate to the Edit as JSON screen.
  10. Scroll to the synonyms object (or click into the JSON editor and then use CTRL+F).
  11. 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.
  12. 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": []
      },
  13. Click Save.

  14. Navigate to the Configuration Labels screen. Set the PRODUCTION label to (1) and the STAGING label to LATEST. In the popup, click Yes, Update Configuration Label. This way all new changes are on the staging version. You want production to be on the default version until you fully test your changes.

  15. Navigate back to the Home screen. By default the configuration label is set to STAGING. 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”.

  16. 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