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):
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.
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