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:
- Navigate to the site’s Shared Services
Administration home page.
- In the Search section, click Search settings.
- In the Scopes section, click View
scopes.
- Click New Scope on the toolbar.
- On the Create Scope page, enter a
title—this is the text that will appear in the
search scope drop-down menu.
- 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:
- On the View Scopes page, click the
Add rules link for the search scope you just
created.
- On the Add Scope Rule page, in the
Scope Rule Type section, click Web Address.
- In the Web Address section, enter the
path to the document library under Folder.
- 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:
- Navigate to the top-level SharePoint
site home page
- Select Site Actions, Site Settings, Modify
All Site Settings.
- Under Site Collection Administration,
click Search scopes.
- Click the Search Dropdown link.
- 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:
- Navigate to the Shared Services
Administration home page and click Search
settings.
- Click Content sources and crawl schedules
under Crawl Settings.
- 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.
- 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.
- 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
blarg1234 July 02, 2008 (Article Rating: