OOTB SharePoint search is quite powerful. The search engine of MOSS 2007 has only one physical index for each SSP in the farm. This implies that the content from all the content sources defined for the SSP is crawled into the same index. This provide the user’s ability to search across all the content using one query. But in many search scenario, it also calls for mechanisms to automatically narrow user queries to a logical group of content within the physical index. I will introduce two methods here today to achieve that.

Use Search Crawl rules

Search Crawl rules are mechanism to influencing the behaviour of the crawler when it crawls specific sites. A single crawl rule is created by specifying a URL wildcard matching sites plus a set of options for setting the behaviour of the crawler for these sites

For example: if you like all the document views and properties page to be excluded, you can use achieve it by configuring the crawl rule:

1. Go to the crawl rules section of the search setting in the SSP

2. Add crawls rules to exclude the following path:

*://*webflder.aspx*

*://*allitems.aspx*

*://*dispform.aspx*

You can also test a specific URL against the crawl rules to determine whether the rules will include or exclude the URL during a crawl. This feature is not available in SharePoint Server 2003.

In SharePoint 2007, wildcard operator “*” is the only operator supported in crawl rules foe matching everything. Because of its nature that matches everything, it does not have the flexibility to, for example, recognize and omit URL that contain mobile phone number.

SharePoint 2010 includes new capability in this area to support regular expression in the URL

Most of you already know how to use sharepoint custom scope to fine tune your search result. For those who don’t know, there are plenty materials on the internet.:) I only want to get your attention on one of the managed property, contentclass. Essentially, every piece of SharePoint content seems to be tagged with this property. And as long as you know the internal name and its corresponding mapping, you should be able to configure your sharepoint search scope quite efficiently. For example, if you want to return all the documents and pages, you can set up the scope like this:

Below is a list of content class and its mappings prepared by Dan Attis in his blog. Should give you enough information to get started.

ransaid

my contentclas result for any param is 0. I tried to delete the craled content.
created a new site with genericlist and created for this site new content source but still no result.
My env is windows 2008 ,moss 2007 sp2, x64.
I did the same rule and scope in server 2003 and all worked fine.