3

I have a top site collection (http://myportal) and subsite (http://myportal/teamsite) in a SharePoint 2010 based intranet.

My Question:
I am trying to configure search in such a way that when a user makes a search using the default search in http://myportal only items from the subsite shows up in the results (http://myportal/teamsite).

Additionally, any items residing in the top site collection (http://myportal) should not be crawled or come up in the search result.

Things I have tried:
1. I have created a content source pointing to the site collection http://myportal.
2. I created the crawl rules in the following order:-
first rule - http://myportal/teamsite*.* - include all items
second rule - http://*.* - exclude all items

The problem is once the content source is crawled it indexes all items residing in the top site collection as well including the subsite. Need some advice on this.

4 Answers 4

1

you could do the following:

Just add a custom search scope.

You can do this for a site collection from Site Actions, or for the server from Central Administration.

Here's the steps for a site collection:

1) Go to your top level site in the site collection

2) Go to Site Actions, Site Settings

3) In the Site Collection Administration columnclick Search Scopes

4) Click New Scope, enter a name (this will be displayed in the scope dropdown), description and checkmark where you want it displayed

5) Click OK

6) Find your new scope in the list and click Add Rules

7) Click Web Address and enter the site URL (http://servername/sites/peers), leave >Include checked

8) Click OK

http://social.technet.microsoft.com/Forums/en/sharepointsearch/thread/250b3b6f-53b6-443f-8916-9ceaa32aab90

you can also setup crawl rules: (dont forget it's procedural meaning if you want to ignore say the parent then do that first and then the next rule goes to the child)

http://reality-tech.com/2012/01/09/limiting-search-crawling-to-a-subsite/

and msdn

http://technet.microsoft.com/en-us/library/cc262531(v=office.12).aspx

hope it helps :)

2
  • I saw all the links before I asked the question and none of them helped. If you closely look into the crawl rules I had setup, its the same as mentioned in the link. Thanks for your efforts anyways.
    – ArkoD
    Aug 29, 2012 at 13:46
  • It is better NOT to use crawl rules in this situation. Instead you should be using scope rules. Big difference is tha crawl rules gather at the crawler level, and scope rules work against only what the crawler has gathered and indexed. The advantage is that the scope rule is more simpler to specify as rules, AND you don't have to rerun a full crawl whenever you adjust it. Any changes to the crawl rules will always require a full crawl to run. Apr 15, 2013 at 12:24
0

enter code hereMoss Farmer, have you tested the URLs? In the crawl rules screen, after you set up the crawl rules you can type a URL in and click "Test" to see if it will crawl a certain URL...

Have you tried changing the second rule to http://myportal/* or http://* without the periods. I would avoid using periods and see if that works.

So your rules would be: Rule 1: http://myportal/teamsite/* include Rule 2: http://myportal/* exclude

If this doesn't work I would look into creating a user just for this content source which doesn't have access to the parent site but has access to the team site. You can add a crawl rule which includes http://myportal/teamsite/* and has the new user you created as an authentication user

0

Create a search scope for your subsite (http://myportal/teamsite). and configure that search scope to the search box that is been used in your parent site.

Search will crawl all the data but the it is only search scope which will narrow the results. I guess the search box from which the search is performed has a different search scope.

0

Ok, I believe there are 2 things here.

  1. Is it necessary to crawl the parent site at all? Like is there a requirement for you to show the search results at all? If not, you can modify the content source to directly point to your subsite (teamsite in your case) and this would not require any rules or scopes and its pretty straight forward.

  2. If yes, you need to display the parent sites results, then do not set any crawl rules and let it crawl the entire site collection. When the search is administered in a particular site or subsite, you just need to create scopes based on the results you need to display and make this as the default scope of that particular site.

Your Answer

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

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