Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 2008

Customize Search Features in Microsoft Office SharePoint Server 2007

MOSS gives site admins the tools to target searches to users' needs
RSS
Subscribe to Windows IT Pro | See More Administration Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Executive Summary:

Microsoft Office SharePoint Server (MOSS) 2007 includes the Advanced Search Web part and the Search Center site template so SharePoint site administrators can take control of the search environment. You can set targeted search scopes, and provide custom search forms and results pages.


Search capabilities in Microsoft Office SharePoint Server (MOSS) 2007 include a host of powerful features suitable for a large enterprise intranet or extranet. Although Windows SharePoint Services (WSS) 3.0 also includes many of these features, only MOSS provides the easy customization of the search scope and UI. SharePoint administrators can customize MOSS to meet many specific business needs.

With MOSS, you can search a wide array of sources in the network, such as Web sites, file shares, and Microsoft Exchange Server public folders—not to mention site contents within the SharePoint server itself. The MOSS standard site collection feature pack offers two search enhancements, an Advanced Search Web part and the Search Center site template, that Share- Point administrators can use to fully customize the site’s UI and search behavior. SharePoint offers two display options for search results: through a search Web service or through the built-in search results page. The search Web service, which lets you access results from client applications outside of the context of SharePoint, is development-intensive and beyond the scope of this article. Managing search scopes and accessing search results from within the SharePoint UI, however, doesn’t require a developer’s skill set—although it isn’t necessarily intuitive or straightforward.

Customize Search Scope
Because SharePoint can crawl contents from a wide array of sources, you use search scopes to let users search a specific subset of the workspace’s entire contents. Targeted scopes help you get better search results while boosting overall search performance.

You customize search scopes in MOSS in the Shared Services Administration section of SharePoint Central Administration. Shared Services are applications that run behind the scenes on their own Microsoft IIS Web applications. These services can be configured from a single place and shared for use by SharePoint sites on multiple MOSS and WSS servers— hence the name. The MOSS search engine is an example of Shared Services. Keep in mind that someone with administrative privileges in the regular SharePoint content sites won’t necessarily have access to Shared Services Administration.

By default, MOSS has two out-of-the-box search scopes:

  • People—searches for all content in the My Sites area of the SharePoint farm.
  • All Sites—searches for content in the entire SharePoint farm.

These scopes both cover a rather broad range of sites. You’ll have to create your own scopes to target more specific areas of your content. Take, for example, a document library list named Catalog, with various custom columns that track document metadata. In the default setup scenario, if you want to search for content only within this document library, you would have to navigate to that document library, then select This List: Catalog in the search scope drop-down menu.

The first item in the drop-down menu is specific to each page. If you’re somewhere else on the site, you’ll see different options on the list—but you won’t see the This List: Catalog scope. The solution is to add a new search scope that appears in the search scope list on every page. Here are the steps to follow to create the new scope:

  1. Navigate to the site’s Shared Services Administration home page.
  2. In the Search section, click Search settings.
  3. In the Scopes section, click View scopes.
  4. Click New Scope on the toolbar.
  5. On the Create Scope page, enter a title—this is the text that will appear in the search scope drop-down menu.
  6. In the Target Results Page section, select Specify a different page for searching this scope and specify a new page name, such as catalogresults.aspx. If the .aspx page you specify doesn’t exist yet, you can create it by accessing the Site Actions menu of the target SharePoint site. Click OK.

Now that you’ve created a new search scope, you need to specify the content this scope should query when searching by adding a rule for the search scope, as follows:

  1. On the View Scopes page, click the Add rules link for the search scope you just created.
  2. On the Add Scope Rule page, in the Scope Rule Type section, click Web Address.
  3. In the Web Address section, enter the path to the document library under Folder.
  4. In the Behavior section, select Include. Click OK.

You’ve now specified a content source for the custom search scope. The next step is to have SharePoint display this custom search scope in the search drop-down menu. This configuration is done through the SharePoint site’s Site Settings page:

  1. Navigate to the top-level SharePoint site home page
  2. Select Site Actions, Site Settings, Modify All Site Settings.
  3. Under Site Collection Administration, click Search scopes.
  4. Click the Search Dropdown link.
  5. On the Edit Scope Display Group page, select the scope you created earlier. As Figure 1 shows, you can also change the order of search scopes on the list and set the default search scope. Click OK.

Schedule the Search Crawl
The SharePoint search engine crawls the content in the search scope every so often. The frequency of this crawl is controlled by a search schedule. By default, SharePoint is set to crawl only once in a 24-hour period for the default search scope content. After you’ve defined your custom search scope, you need to set up a crawl schedule for it. You can set up separate schedules for full crawls, which build an index of all site content, and incremental crawls, which index only changes to content since the last crawl.

A full crawl takes longer and is more resource intensive on the server than a partial crawl. Therefore, it’s best to schedule fewer full crawls than incremental crawls and to schedule them during non-peak hours. A partial crawl, however, doesn’t detect all types of changes.

For example, when a row item on a Share- Point list is changed or deleted, a partial crawl won’t find the change because it can’t recognize changes to .aspx pages. A full crawl is required to re-index the list data after such changes.

You set up custom crawl schedules through the site’s Shared Services Administration. Follows these steps:

  1. Navigate to the Shared Services Administration home page and click Search settings.
  2. Click Content sources and crawl schedules under Crawl Settings.
  3. On the Manage Content Sources page, right-click the content source for which you want to schedule a crawl, then click Edit. You can also define a new content source by clicking the New Content Source button on the toolbar.
  4. On the Edit Content Source page, in the Crawl Schedules section, click the Create schedule link below either the Full Crawl or Incremental Crawl drop-down list.
  5. In the Manage Schedules dialog box, fill in the crawl schedule details and click OK. For example, to run the crawl every two hours throughout the day, select Daily in the Type section; under Settings, enter 1 in the Run every box so it runs every day; select the Repeat within the day check box, then enter 120 in Every as the number of minutes between crawls and 1440 in For as the number of minutes for this cycle to repeat.

Customize the Search UI
Adding a custom search scope to the search drop-down menu is an example of search UI customization. MOSS provides numerous out-of-the-box features, such as Web parts and site templates, that let you customize the UI of both search and results pages. Search Center is a new site template dedicated to search functionality; it’s embedded with many standard search-related Web parts.

The Search Center site template comes in two flavors: Search Center Lite and Search Center with Tabs. Search Center Lite is available in site collections by default where the Office SharePoint Server Publishing feature isn’t activated. Search Center with Tabs is available in site collections with the publishing feature activated; this version lets you create a custom UI that includes tabs with different searches. You can see a list of both activated and available features of a site by going to the site collection’s administration page and clicking Site collection features. The Search Center is usually a sub-site under the site collection with the URL http:///search center/. In a publishing site, you can also create your own Search Center sub-site by using the Search Center with Tabs template on the Enterprise tab in the New SharePoint Site page, as Figure 2 shows.

Continued on page 2

   Previous  [1]  2  3  Next 


Reader Comments
efsaefee

blarg1234 July 02, 2008 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...

PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...

Escape From Yesterworld

Kevin points you to the funniest SQL Server website ever! ...


Related Articles Stsadm: Taking Control of SharePoint Administration

High Availability for MOSS 2007 Server Farms

SharePoint Server 2007 Unleashed

SharePoint Security Evolution

SharePoint Whitepapers Best practices for deploying Microsoft Office SharePoint Server 2007

Protecting Sharepoint with Double-Take for Windows 5.0

Dramatically Accelerate Microsoft SharePoint

Related Events Introduction to Identity Lifecycle Manager "2"

Delivering Reliable and Effective Web-Based Applications

Making Web Application Perform Better: What to Watch, How to Watch It, and How to Fix It

Check out our list of Free Email Newsletters!

SharePoint eBooks Getting Started with SharePoint

Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing