Home > Sample chapters

Managing the Search Experience in Microsoft SharePoint 2010

Site Collection Search Management

Most of the customization with which users interact is created and managed at the site collection level. Even sites, lists, and libraries present settings that control and affect search results. This section will begin a series of discussions on customizations controlled by local administrators and users.

Configuring the Master Page Query Box Control

The first decision for the site collection administrator is whether to use the default context scopes only, such as Windows SharePoint Foundation, or to use custom scopes with a search center in the search query box that appears on all pages. To change from the default settings, open the Search Settings page shown in Figure 9-26 from the Site Collection Administration group in Site Settings.

This page is required because the search query box that appears on each page is a control presented by the master pages. The same configurations are directly available in all Search Query Web parts.

The default configuration, Do Not Use Custom Scopes, executes queries for This Site, including subsites, and presents no scope options. Your design can include leaving the default settings for this query box and creating a search center site for enterprise content searches.

The results are displayed on the results pages defined in the Site Collection Search Results Page section at the bottom of the page. The default location of the page is a generic page in the _layouts directory that is common across all site collections. You can create a custom search results page for local searches and direct queries to it in this section.

Figure 9-26

Figure 9-26 Site Collection Search Settings page.

If you choose to use custom scopes, you must direct the queries to a search center. The example in Figure 9-26 assumes a search center with tabs, which is a publishing site and has all search pages in a pages library. You can also point to a simple search site. The entry in this dialog box normally is a path relative to the application name such as /Search or /SearchCenter/pages, but it can also be a full path such as http://portal.contoso.com/SearchCenter/pages. You do not need to include the page because the query will be directed to the appropriate results page.

The default setting is to not display a scope drop-down box and to use the contextual scope. The other choices are as follows:

  • Do Not Show Scopes Dropdown, And Default To Target Results Page. Does not display a scope drop-down list, and sends the query to the results page with no scope selected. Normally, this will be a custom results page with Web parts configured to use one or more scopes.

  • Show Scopes Dropdown. Displays the scopes defined in the search drop-down display group and the contextual scopes in the scopes list. This option is shown in Figure 9-27.

  • Show, And Default To ‘S’ URL Parameter. Displays the scopes defined in the search drop-down display group and the contextual scopes in the scopes list. The selected scope will be added to the query passed to the results page using the ‘s’ parameter.

  • Show, And Default To Contextual Scope. Displays the search drop-down list, and automatically selects the This Site or This List scope as the default. Contextual scopes cannot be managed in the search drop-down list.

  • Show, Do Not Include Contextual Scopes. Displays only the scopes in the search drop-down list that do not include This Site and This List contextual scopes.

  • Show, Do Not Include Contextual Scopes, And Default To ‘S’ URL Parameter. Displays only the scopes defined in the search drop-down display group in the scopes list. The selected scope will be added to the query passed to the results page using the ‘s’ parameter.

    Figure 9-27

    Figure 9-27 Search box control configured with the Show Scopes Dropdown option.

Site Collection Search Scope Management

Search scopes that you create at the service level are considered shared scopes. These scopes are available across all the Web application’s site collections that are associated with the service. Site collection owners then have the option to use the scopes within their site collection.

Site collection scopes are managed from the View Scopes page, shown in Figure 9-28. To open this page, from the Site Collection Administration menu in Site Settings, click the Search Scopes link. Notice the Unused Scopes section at the bottom of the page.

Figure 9-28

Figure 9-28 The Site Collection View Scopes page.

New local scopes are created from the View Scopes page by clicking the New Scope link and following the same steps as creating a shared scope at the search service level. The only differences between a local scope and a shared scope is that a local scope cannot contain a rule using a content source and that it can be used only in the local site collection.

To select how both local and shared scopes are displayed in the site collection, follow these steps:

  1. Click the Display Groups link to open the page shown in Figure 9-29.

    Figure 9-29

    Figure 9-29 The Display Groups page.

  2. Click the display group that you want to modify. You are then presented with the Edit Scope Display Group page, shown in Figure 9-30.

    Figure 9-30

    Figure 9-30 The Edit Scope Display Group page.

  3. Now you can add unused scopes by selecting their check box in the Display column, change the order in which the scopes are listed, and choose the default scope.

  4. Click OK.

Now your scope display group will appear correctly when selected for query controls or Web parts.