I have managed path called "projects" and site collections for each year (2016, 2017) and each project site path has the prefix proj-

For example my path can look like:

mysite.org/projects/2017/proj-123 or mysite.org/projects/2016/proj-321

I want to do a search query to return all project sites across the web app so I was thinking: {searchterm} contentclass:sts_web path:"mysite.org/projects/*/proj*"

but this returns an error? Is it possible to have a path with two wildcards?


SharePoint only supports "suffix" wildcards. You can only do mysite.org/projects/2016/proj* OR mysite.org/projects/2017/proj*. Another approach would be to query on the WebTemplate type if you are using a specific template.

  • Thank you for the clarification. We're creating the site through code so I'll just have them set a custom template code or a property in the property bag which they've already decided to use to use store data. – Batman Mar 21 '17 at 15:50
  • Ugh, another property bag solution. You know you can add a list with the site data on it, right? I need to blog this solution. – Matthew McDermott Mar 22 '17 at 13:44
  • Yea I'm the same person from last time lol. The solution is to far ahead and I'm too junior to convince them to change the way they're approaching it given the deadline. – Batman Mar 22 '17 at 15:03
  • 1
    You can build my site data solution in minutes, no development. The problem is usually the developers do not know how SharePoint works and they just google "How do I create a Site Catalog". I'll put together a post. – Matthew McDermott Mar 23 '17 at 12:20

You can try the search param

{searchTerms}  ParentLink:[your text]

In you case, try this:

{searchTerms}  ParentLink:/proj*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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