Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am trying to configure the sharepoint search in a way that it would display the results only for the pages within the SitePages library of a particular SubSite in a collection.

Initially I had the results from SiteAssets folder as well, which I succeeded in keeping out by setting some Exclude Rules.

However now the issue I am facing is I want the search scope to be restricted only to the particular subsite and currently it shows me the results for the entire SiteCollection. I have tried all the combinations selecting deselecting of "search in context" for the search webpart. On using the context it again includes the Site Assets pages, that I need to exclude.

Is there a way to do this using the out of box configurations?

Or am I doing it completely wrong and it needs a different approach?

share|improve this question

migrated from stackoverflow.com Nov 20 '12 at 18:09

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers 3

Have you tried adding a search Scope with the Folder Url set to your subsite's url + /SiteAssets and with Behavior set to Require?

share|improve this answer
    
Thanks a lot for this. It worked and now I have a rule set for filtering out pages from SiteAssets and showing only those in Site Pages.The issue now is the results are shown from different sites and I want them to be only from one site. I assume that's because of "All Content" rule I have selected. But if i don't do that I get 0 search results. Any help on resolving this would be greatly appreciated. –  user1826638 Nov 19 '12 at 16:39
    
Did you include the url of the site in the rule, e.g, <host/subsite/SiteAssets>; vs. /SiteAssets? –  Steve Mannina Nov 20 '12 at 16:09
add comment

Use a refiner with the url to the Site Pages Libray.

When I selected the Site Pages in the refinement panel of my search center, it added the following parameter to my Search Query URL

r=site%3D%22http%3A%2F%2Fsp2010%2FSitePages%22
share|improve this answer
add comment

Have you tried to disable the option "allow items from this document library to appear in search result" for your Site Assets in the Advanced Settings of this library? (Site Assets / Library Tab / Library Settings / Advanced Settings / ...)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.