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}*)
    – Pradip R.
    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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.