Question

We have about 20 departments with about 100 sites (average) connected to each department. So, that is a total of some 2.000 sites. Per department I have a hub site and like to use PnP Modern Search to list my sites connected to the hub. I use three web parts: a search result web part, a search box to search (optional) for site title, and a filter web part to filter the sites from the result set. The filter uses several properties from the site property bag. The hub represents all sites of some department. At this moment I use this in the Query Template

SiteTitle:{searchTerms} AND contentclass:STS_site

Now I get all sites. Of course, trimmed-search makes sure I see only the sites I can access, so I do not see all 2.000 sites. But I want to see only my sites of my department.

What do I need to add to the query to be able to filter for sites connected to this hub?

The alternative is to add a site property to group the sites that belong to a department, but that is a lot of maintenance effort when a department changes the name or when any other organisation change takes place. Just working with the hub-structure seems the best way.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top