Forum Discussion
paulpascha
Feb 07, 2017Bronze Contributor
Search Site Collections by URL
I am having troubles defining a Search Query in a Search Results WebPart. In our tenant we have multiple site collections. We've chosen to use a naming convention in Site Collection URL's. Based ...
Feb 08, 2017
Actually when the query is like the below, the url is contains double-quote at the start and end.
contentclass:STS_Site Path:{SiteCollection.URL}*
Due to this the final path in the query looks like
Path:"https://tenantname.sharepoint.com/sites/testsite"*
But if you can hard-code the path, the search results are correct
contentclass:STS_Site Path:https://tenantname.sharepoint.com/sites/testsite*
This information may be useful for you to proceed further.