SPFx react-search-refiners webpart | No results from teamsites displayed

Copper Contributor

I'm using the SPFx SPFx react-search-refiners webpart and I don't know if this is a bug or this is due to SharePoint restrictions.

 

When I enter a KQL query I supose to get the same results as I use the query in the search box or in the SharePoint Search Query Tool.

 

I have a hub site (SharePoint Communication Site) with several group connected Teamsites connected to this hub site. When I enter the following query
Path:https://tenant.sharepoint.com/teams/* contentclass:STS_Site SiteTemplate:GROUP
in the Query Template box no results are returned.


But when I enter this same query in i.e. the SharePoint Searchbox I get a list of the teamsites back.
And when I add this same query in the SharePoint Search Query tool I also get the right results back.
Some Teamsites are private and some are public, and I'm Owner of all sites.

 

Steps to Reproduce:

  1. Create new Communication Site
  2. Make this site a hub site
  3. Create several teamsites
  4. Connect them to the hubsites
  5. Add the webpart to the startpage of the hub
  6. Configure webpart:

Is this a bug or is this due to SharePoint restrictions?

5 Replies

Are Groups you are searching for set as "Private"? By default Search REST API is not including Private Groups on search results.

Web Part is not including EnableDynamicGroups property on search query. So it is not a bug, it's just feature missing.

 

 

 

Thanks for the information. I'm will check the EnableDynamicGroups property.

I added the following lines of code to the SearchServices.ts file:

searchQuery.Properties = [{
    Name: "EnableDynamicGroups",
    Value: {
        BoolVal: true,
        QueryPropertyValueTypeIndex: 3
    }
}]
 
And it is working now. Thanks @Matti Paukkonen for pointing me in the right direction.

Great!

This change should be committed to the community repository also.