Module Assessment | Yext Hitchhikers Platform

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

Background

People have been asking if fan-favorite specials like the “Golden Taco” are being served during every Turtlehead Tacos hosted event. You have already helped them find which restaurant locations are holding specific events, but you decide you want to make the event specials searchable on the restaurant and events vertical. We’ve already added event special entities and added them to the related events for you. You will:

  • Add event specials as a searchable field to the Events vertical.
  • Add event specials as a searchable field on the Restaurants vertical using multihop logic.
  • Add event specials as a facet on the Restaurants vertical using multihop logic.
  • Customize the facet for events specials on the Restaurants vertical.

Your Challenge

  1. Navigate to Search > answers > Home. Test out the query “Golden Taco” in your full-screen Test Search. Notice that the Events where that item is served like “Taco Slam” or “Find that TacoMania” don’t appear in the results.

  2. Navigate to Search > answers > Verticals. Add a searchable field in the Events vertical for the linked Specials and set it as an NLP filter. Remember that linked entity fields can index any field of the linked entities using dot notation in the format c_relationshipField.fieldName or in this case c_ eventSpecials.name.

    • To use the UI to do this, click on Verticals and click the dropdown to view the Events vertical. You can then click on “+Add / Update Searchable Fields”, find the c_eventSpecials.name field, and then add an NLP Filter.
    • If you want to use the Code Editor, click on “Edit as JSON” and scroll to your “events” vertical object. In searchableFields, you should see fields like name, builtin.entityType, builtin.location and mainPhone. Add c_ eventSpecials.name with NLP Filter set to true.
  3. Run a test search for “Golden Taco” on the right side and you will now see Events appear in the results.

  4. Now let’s add a searchable field with multihop! Add a searchable field in the Restaurants vertical for the linked Events’ Specials Name field and set it as an NLP filter and facet. In this case, you need to use multihop dot notation which will allow Search to pull field data from a linked entity of a linked entity. Use the format c_relationshipField1.c_relationshipField2.fieldName or in this case c_promotingEvents.c_eventSpecials.name.

    • You will need to use the Code Editor for searchable fields with multihop. Click on “Edit as JSON” and scroll to your “restaurants” vertical object. In searchableFields, you should see fields like name, builtin.entityType, builtin.location and mainPhone. Add c_promotingEvents.c_eventSpecials.name with NLP Filter and Facet set to true.
  5. Run “Golden Taco” again in Test Search and you will now see the NLP filter for that event special appear in the box underneath the Restaurants vertical header. You will also see results for locations serving that item (based on the events being held there).

  6. Now let’s see how the frontend looks and customize the facet. Navigate to Pages > Turtlehead Taco Search > Deploys, go to the Code Editor, and click into the master branch. You should expect this to take a couple of minutes to load – in the background, it’s starting up a container for your development.

  7. Click “View Live Preview” to open your preview in a new tab.

  8. Go to the Restaurants vertical and view the filters. Filters are already set up to appear on the vertical, but you notice that the title for the new c_promotingEvents.c_eventSpecials.name facet is labeled as “Promoting Events Event Specials Name” (the combination of each hop). We want to clean that up.

  9. In the config > restaurants.json file, let’s customize how the c_promotingEvents.c_eventSpecials.name facet looks and behaves.

    • Change the label to “Featured Event Specials”.
    • Make the c_promotingEvents.c_eventSpecials.name field searchable:

      "fields": {
        "c_promotingEvents.c_eventSpecials.name": {
          "label": "Featured Event Specials",
          "searchable": true,
          "placeholderText": "Search our featured specials"
        }
      }
  10. Use Live Preview to verify your updates.

  11. Commit your code. Monitor the build and publish your page in staging. Confirm that your staging URL works as expected.

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 Event Specials relationship field to Events vertical as NLP filter
Add Event Specials relationship field to Restaurants vertical as NLP filter by using multihop logic
Add Event Specials relationship field to Restaurants vertical as facet by using multihop logic
Update facet settings for Event Specials in the restaurants json file using multihop logic
Previous Submissions
Attempt #<% submission.attemptNumber %>
<% submission.date %>
Score: <% submission.numericScore %>
Pending
Feedback