Adding Entity Relationships to the Search Configuration | Yext Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • How to add direct and multihop entity relationships to the Search Congifuration
  • Use cases for utilizing multihop vs. direct entity relationships

Direct Entity Relationships

To add an entity relationship in the Search Configuration, first ensure that your Knowledge Graph entities are configured and linked together. You can then navigate to your Search Configuration vertical and use dot notation to configure the desired searchable field types. For example, if you have a Doctors vertical and want to set up text search on linked specialty names, you can use the following dot notation format:

{
  "verticals": {
    "ce_doctors": {
      "searchableFields": {
        "c_relatedSpecialties.name": {
          "textSearch": true
        }
      }
    }
  }
}

In the UI, it should look like this (note that you can only add name objects via the UI):

Direct Relationship Config UI

You can use any field on a linked entity and any searchable field type to configure this as needed for your brand’s search experience.

Use Cases

  • Displaying similar or complementary products to customers when they search for a product entity
  • Returning menu items based on ingredients or allergens entities they are linked to

Multihop Relationships

Multihop relationships take direct entity relationships a hop further. In other words, you can set up your Search Configuration to retrieve data not only from a linked entity but also from a linked entity of a linked entity.

Going back to the Doctors vertical example above, you could link conditions to a specialty that is also linked to a doctor. This would allow patients to search for conditions and get results for Doctors that treat them even though those entity types aren’t directly related.

Multihop Healthcare Diagram

To set this up, ensure that your Knowledge Graph entities are configured and linked together. Then, for example, you can use dot notation to set up the multihop:

{
  "verticals": {
    "ce_doctors": {
      "searchableFields": {
        "c_relatedSpecialties.c_relatedCondition.name": {
          "nlpFilter": true
        }
      }
    }
  }
}

This example shows an NLP filter configured in multihop, which supports Doctor searches such as “doctors who treat high blood pressure” to return a list of doctors associated with the condition “high blood pressure” through an intermediary relationship with specialties (e.g., cardiology).

Use Cases

  • Returning a list of doctors who treat certain conditions based on their specialty
  • Displaying financial institutions based on the services provided by their employees
unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 2

    True or False: Entities must be directly related in order to retrieve linked entity data in Search

    Error Success Question 2 of 2

    If you want to return a retail location when searching the name field of linked product, you would use the following in your Search Configuration:

    You're a star! ⭐

    You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect
Feedback