Let's say we have
/sites/hub-1 which is a hub site and template is team site. Then we have 2 sites associated to
/sites/team-1which is a team site
/sites/comm-1which is a communication site
Now if I use search api inside
/sites/hub-1 like one below I get results from both team-1 and comm-1.
But when my
/sites/hub-1 is communication site the above search query returns result only from comm-1. No results are returned from team-1
This behaviour has nothing to do with hub sites, rather i observed the same when using search api inside any other communication site as well. It returns results from communication sites only. But when we use same api inside team site it returns results from both team and communication sites.
What is so different is searching from communication site?