1

I am using PnP modern search for Sharepoint Online hub site, the hub site has around 100 associated sites. I need a query which return the result if SiteName or SiteURL contains that search terms.

For eg, if my searchTerms is CLG, so I expect the result returned should either have that searchTerm in SiteName or SiteTitle

Currently I have query which return result only for SiteName

{searchTerms} contentclass:sts_site Path:"https://dummy01.sharepoint.com/sites/MyHubSite"

I tried query like

 {searchTerms} contentclass:sts_site spsiteurl:/sites/ {searchTerms} Path:"https://dummy01.sharepoint.com/sites/MyHubSite"
1
  • Try if this query works for you ContentClass:STS_Site (SiteName:{searchTerms}* OR SiteTitle:{searchTerms}*) Commented Jul 14, 2023 at 14:15

1 Answer 1

0

I was able to get desired result with below query

spsiteurl:/sites/{searchTerms} OR {searchTerms} contentclass:sts_site
Path:"https://dummy01.sharepoint.com/sites/MyHubSite"

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.