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 running a pretty simple SharePoint 2010 Standard site collection. Right now, there are only three sites, two team sites (a parent site and a child site) and a basic search center. Currently, content is being crawled from both the parent site and the child site. Both of these sites, coincidentally, point to the search center for their search functions. When a search is run from either site, it searches the entire site collection. What I would like to do is when a user searches from the child site, it only pulls results from the child site itself. Now, I understand I could just use the default search feature for the child site. However, as far as I am aware, this prevents you from being able to configure the search results. Is there anyway to setup this functionality in SharePoint 2010?

Requirements

  • The search results must be configurable
  • The search selection happens automatically (based on the site the user is currently viewing) without users needed to select a scope or site
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

In case you want to modify search box below ribbon scope: You could follow instructions in this article: How to make "This Site" the default SharePoint search scope. It is written for v2007 but still applies for 2010. I tested this and it worked for me.

The path for file changed to 14 Hive:

  • C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\OSearchEnhancedFeature

There are two problems with this:

  • Note from original article: Important: when you customize the SearchArea.xml file, it is unghosted, meaning that future patches and upgrades could overwrite your changes. As a best practice, you should create a feature to install this unghosted file to current site collections and deploy the change in this manner.
  • This change affects all site collections on your server

alt text

share|improve this answer
    
Does this apply to the search centers, the basic default search, or both? –  Psycho Bob Oct 21 '10 at 20:24
    
This is for search box below ribbon. Search Center is on a separate site and it does not have this search box. Searching just on Search Center site does not make sense because it usually does not hold content. –  Toni Frankola Oct 21 '10 at 21:23
    
Hey, Toni, turns out that I was entirely over thinking what I was trying to do. Thanks for your help. –  Psycho Bob Nov 1 '10 at 14:57
add comment

Your Answer

 
discard

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

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