2 min read

Sitecore Content Hub - relationship not visible in search

A short little post since I noticed something important in the documentation and in my test environment as well.

I had a use-case where an entity definition needed to have a link to M.UserProfile.

Initially my relation set M.UserProfile as a child of my custom entitiy definition.
However, this resulted in pages with the Search component where I did not see this relation.

Disclaimer: I renamed the entity to CustomEntity to keep this post client neutral.

Then I remembered my previous blog post where I had to set the Taxonomy-enabled definition on an entity definition, also because I did not see any results on my custom pages.

So I changed this as well for M.UserProfile. However it did not result in seeing the userprofiles on my custom pages.

But then I read the discription on the documentation page. Turns out my relation was not created properly!

M.UserProfile should not be a child of my entity but the other way around.

Edit an entity definition
Learn how to update your solution with the latest changes.

Taxonomy-enabled definition
Indicates that entities of this definition are taxonomy items, which can be used in a search facet. The definition used for the facet must be a parent of the searchable definition. For example, M.AssetType must be a parent of M.Assets for the asset type facet to appear on the asset details page.

End result

I changed it and now I have the userprofiles visible in my Search components and Facet filtering.