Share via


Change properties for the Search Box Web Part (Search Server 2010)

 

Applies to: Search Server 2010

Topic Last Modified: 2011-01-18

This article describes how to configure search settings for a site collection, and then describes how to configure Search Box Web Part properties. Search Box Web Part settings depend on the search settings that are configured for the site collection by the site collection administrator. Site collection search settings affect all sites in a site collection. However, Search Box Web Parts that appear on pages in sites can be configured by site owners if they want to specify a particular configuration for that page.

In this article:

  • Site collection search settings

  • Search Box Web Part settings

  • Configure the common properties of a Web Part

Site collection search settings

This section describes how to configure search settings that affect all sites in a site collection. It describes only settings found on the Search Settings page and does not include any settings for the Search Box Web Part. Settings and configuration for the Search Box Web Part are described in the next section.

To configure search settings for a site collection

  1. Verify that the user account that is performing this procedure is a site collection administrator for the site collection for which you want to configure search settings.

  2. Browse to the root of the site collection for which you want to configure search settings — for example, http://<ServerName/SiteCollectionName>/pages/default.aspx.

  3. On the Site Actions menu, click Site Settings.

  4. In the Site Collection Administration section, click Search Settings.

  5. On the Search Settings page, configure the following properties:

    • Site Collection Search Center. By default, custom scopes do not appear in the scopes drop-down list so users are not able to use All Sites or People in a site that is not a Search Center. This property provides the ability to display custom scopes in the drop-down list and provide the URL to the Search Center that these custom scopes searches should navigate to display the search results. Any custom scope that does not explicitly list a specific URL will use the default Search Center URL. The URL can be a relative value to the root site collection, or it can be an explicit value.

    • Site Collection Search Dropdown Mode. This setting configures the drop-down mode for all search boxes within the site collection. The drop-down mode options that are available are listed in the following table.

      Option Description

      Do not show scopes dropdown, and default to contextual scope

      This is the default setting. This will not render the scopes drop-down list on any page and all queries will default to the contextual scope such as the current site or current list being searched.

      Do not show scopes dropdown, and default to target results page

      This option will not render the scopes drop-down list, but all queries will not be contextually scoped. This is an All Sites custom scope search. If Site Collection Search Center is enabled to use custom scopes, all queries will use the search center specified in the URL of this property. The Site Collection Search Center property must be enabled to use custom scopes, if the property is not enabled to use custom scopes, all queries will be displayed in the site collection search results page. The default is: /_layouts/OSSSearchResults.aspx.

      Show scopes dropdown

      This will render the scopes drop-down list on any page and the scope that appears as the default value in the drop-down list will be the contextual scope. If custom scopes are not enabled, the drop-down list will display the default scope in the custom scope display group.

      Show, and default to 's' URL parameter

      This property is similar toShow scopes dropdown. The difference is that once a query is executed, the default scope to display in the scopes drop-down list will be the same scope as the original query.

      Show and default to contextual scope

      This renders the scopes drop-down list on all pages. The scope that appears as the default value in the drop-down list is the contextual scope regardless if custom scopes are enabled or not.

      Show, do not include contextual scope

      This will render the scopes drop-down list on all pages but will not include contextual scopes. This value should only be used if custom scopes are enabled. The default scope in the drop-down list will be the default scope in the custom scope display group.

      Show, do not include contextual scopes, and default to 's' URL parameter

      This property is similar to Show, and default to 's' URL parameter. The difference is that contextual scopes will not be included in the scope drop-down list that is rendered on all pages.

    • Site Collection Search Results Page. This property configures the search results page used for contextual searches. This setting can only be configured if the Site Collection Search Dropdown mode includes contextual scopes. This setting should be changed if you plan to use a customized page instead of the default osssearchresults.aspx page to return contextual searches. This setting is new for Search Server 2010. It allows custom page creation rather than editing the existing osssearchresults.aspx page when the osssearchresults.aspx page is replaced during patching and upgrades.

      Note

      When you change the search settings, it may take a few minutes for changes to take effect on the site collection. You can refresh the page to resolve the issue. 

Search Box Web Part settings

The Search Box Web Part can appear on any page in a site collection and appears by default on the Search Center for the site collection. This section describes the available properties for the Search Box Web Part that are used in conjunction with the site collection settings.

To configure Search Box Web Part properties

  1. Verify that the user account that is performing this procedure is a member of the Designers group.

  2. Go to the page that displays the Search Box Web Part that you want to configure.

  3. On the Site Actions menu, click Edit Page.

  4. On the Search Box Web Part menu, click Edit Web Part.

  5. Use the information in the following tables to configure the Scopes Dropdown, Query Text Box, Query Suggestions, and Miscellaneous properties.

    To do this Perform these actions

    Show a drop-down list in the search box that contains all scopes defined for this site collection

    Under Scopes Dropdown, in the Dropdown mode list, select Show scopes dropdown.

    Show a drop-down list in the search box and select a default scope. (For example, if the URL is default.aspx?s=scope1, scope1 is the default scope.)

    Under Scopes Dropdown, in the Dropdown mode list, select Show, and default to ‘s’ URL parameter.

    Show a drop-down list in the search box, and default to a site or list scope.

    Under Scopes Dropdown, in the Dropdown mode list, select Show and default to contextual scope.

    Show a drop-down list in the search box, but do not include scopes defined for the current site or current list.

    Under Scopes Dropdown, in the Dropdown mode list, select Show, do not include contextual scopes.

    Show a drop-down list in the search box, select a default scope, but do not include scopes defined for the current site or current list.

    Under Scopes Dropdown, in the Dropdown mode list, select Show, do not include contextual scopes, and default to ‘s’ URL parameter.

    Default only to a scope defined for the current site or current list, and do not show a drop-down list in the search box.

    Under Scopes Dropdown, in the Dropdown mode list, select Do not show scopes dropdown, and default to contextual scope.

    Default only to the target results page, and do not show a drop-down list in the search box.

    Under Scopes Dropdown, in the Dropdown mode list, select Do not show scopes dropdown, and default to target results page.

    Label the scopes drop-down list

    Note

    The Use site dropdown mode check box in the Miscellaneous node must be cleared for this property to work. By default, this check box is cleared.

    Under Scopes Dropdown, under Dropdown label, click … Click to use Builder . Type up to 300 characters for the label.

    Set the width of the scopes drop-down list

    Under Scopes Dropdown, in the Fixed dropdown width (in pixels) box, type a value from 1 through 1000.

    Use the information in the following table to change the appearance of the search box and specify whether additional query terms are appended.

    To do this Perform the following actions

    Add a user interface label for the search box

    Under Query Text Box, in the Query text box label box, type the text that you want to use as the search box label.

    Change the size of the search box

    Under Query Text Box, in the Query text box width (in pixels) box, type the number of pixels for the width of the box. The default is 368 pixels. There are no maximum or minimum requirements.

    Append keyword terms or property filters to all queries

    Under Query Text Box, in the Additional query terms box, type the text to be appended to queries (maximum of 500 characters).

    Add a user interface label to describe appended query terms

    Under Query Text Box, in the Additional query description label box, type the text to that describes the purpose of the additional query terms (maximum 300 characters).

    Add or remove text in the search box that prompts users — for example. “Search <SiteName>”.)

    Under Query Text Box, in the Query box prompt string box, type the text that you want to appear. The text appears until the user clicks in the search box. You can type a maximum of 300 characters.

    Query suggestions can be displayed as queries are typed in the search box. Use the information in the following table to change the query suggestion settings.

    To do this Perform these actions

    Turn query suggestions on or off.

    Under Query Suggestions, select or clear the Show query suggestions check box.

    Change the minimum prefix length.

    Under Query Suggestions, in the Query suggestion minimum prefix length box, type a number that has a value of 1 or greater. There is no maximum. The default is 2.

    Change the minimum number of characters required before suggestions appear.

    Under Query Suggestions, in the Suggestion delay (in milliseconds) box, type a number that has a value of 1 or greater milliseconds. There is no maximum. The default is 250 milliseconds.

    Warning

    Setting this value lower than the default value may degrade performance.

    Change the maximum suggestions displayed

    Under Query Suggestions, in the Number of suggestions to display box, type a number that has a value of 1 or greater. There is no maximum. The default is 8.

    By using the settings in the Miscellaneous node, you can take advantage of site settings. Use the information in the following table to specify miscellaneous settings.

    To do this Perform these actions

    Use the search box drop-down mode that is specified for the site collection. This setting is on the Search Settings page and is set by the site collection administrator.

    Under Miscellaneous, select or clear the Use site dropdown mode check box.

    Use the results page defined in the Search Settings page in the site collection. This setting is overridden if the scopes drop-down list is set to Show Scopes Dropdown.

    Under Miscellaneous, select or clear the Use site level defaults box. By default, this box is cleared.

    Add or remove the Advanced search link next to the search box

    Under Miscellaneous, select or clear the Display advanced search link check box. By default, the box is selected and links to the advanced.aspx page.

    Add or remove the Preferences link next to the search box

    Under Miscellaneous, select or clear the Display user preferences link check box. By default, the box is selected.

    Change the look of the Go Search button that starts a search query.

    Under Miscellaneous, in the Search button image URL box, type the path of the image file. The image must be 16 x 16 pixels.

    Change the look of the Go Search button that is in effect during a search query.

    Under Miscellaneous, in the Active Search button image URL box, change the URL to point to a new image.

    Change the look of the search box when the pointer moves over it

    Under Miscellaneous, in the Search button right-to-left image URL box, change the URL to point to a new image.

    Change the active search button right-to-left image

    Under Miscellaneous, in the Active Search button right-to-left image URL box, change the URL to point to a new image.

    Change the location of the Advanced Search page

    Under Miscellaneous, in the Advanced search page URL box, type the URL for the Advanced Search page.

    Change the search results page url

    Under Miscellaneous, in the Target search results page URL box, type the URL for the Target Search Results page.

    Set the display submitted search box

    Under Miscellaneous, select or clear the Display submitted search box to display the submitted search with the search results.

    Define the scope display group for the Search Box

    Under Miscellaneous, in the Scope display group box, type the name of the display group. Scope display groups are defined on the Scopes Administration page at the site collection or farm level. The scopes contained in the scope display group will display if the scopes drop-down list is displayed.

Configure the common properties of a Web Part

Web Parts share a common set of properties that control their appearance, layout, and advanced characteristics. You change Web Part properties in the tool pane.

Note

The common Web Part properties that you see in the tool pane may be different from what is documented in this section for several reasons:

  • To see the Advanced section in the tool pane, you must have at least Designer permission.

  • For a specific Web Part, a Web Part developer may have chosen not to display one or more of these common properties or may have chosen to create and display additional properties that are not listed below in the Appearance, Layout, and Advanced sections of the tool pane.

  • Some permission and property settings may disable or hide Web Part properties.

For more information about permission levels, see User permissions and permission levels (SharePoint Server 2010) and Security and protection for SharePoint Server 2010.

Appearance

Property Description

Title

Specifies the title of the Web Part that appears in the Web Part title bar.

Height

Specifies the height of the Web Part.

Width

Specifies the width of the Web Part.

Chrome State

Specifies whether the entire Web Part appears on the page when a user opens the page. By default, the chrome state is set to Normal and the entire Web Part appears. Only the title bar appears when the state is set to Minimized.

Chrome Type

Specifies whether the title bar and border of the Web Part frame are displayed.

Layout

Property Description

Hidden

Specifies whether the Web Part is visible when a user opens the page. If the check box is selected, the Web Part is visible only when you are designing the page and has the suffix (Hidden) appended to the title.You can hide a Web Part if you want to use it to provide data to another Web Part through a Web Part connection, but you do not want to display the Web Part.

Direction

Specifies the direction of the text in the Web Part content. For example, Arabic is a right-to-left language; English and most other European languages are left-to-right languages. This setting may not be available for all types of Web Parts.

Zone

Specifies the zone on the page where the Web Part is located. Note    Zones on the page are not listed in the list box when you do not have permission to modify the zone.

Zone Index

Specifies the position of the Web Part in a zone when the zone contains more than one Web Part. To specify the order, type a positive integer in the text box. If the Web Parts in the zone are ordered from top to bottom, a value of 1 means that the Web Part appears at the top of the zone. If the Web Parts in the zone are ordered from left to right, a value of 1 means that the Web Part appears on the left of the zone. For example, when you add a Web Part to an empty zone that is ordered from top to bottom, the Zone Index is 0. When you add a second Web Part to the bottom of the zone, its Zone Index is 1. To move the second Web Part to the top of the zone, type 0, and then type 1 for the first Web Part.

Note

Each Web Part in the zone must have a unique Zone Index value. Therefore, changing the Zone Index value for the current Web Part can also change the Zone Index value for other Web Parts in the zone.

Advanced

Property Description

Allow Minimize

Specifies whether the Web Part can be minimized.

Allow Close

Specifies whether the Web Part can be removed from the page.

Allow Hide

Specifies whether the Web Part can be hidden.

Allow Zone Change

Specifies whether the Web Part can be moved to a different zone.

Allow Connections

Specifies whether the Web Part can participate in connections with other Web Parts.

Allow Editing in Personal View

Specifies whether the Web Part properties can be modified in a personal view.

Export Mode

Specifies the level of data that is permitted to be exported for this Web Part. Depending on your configuration, this setting may not be available.

Title URL

Specifies the URL of a file containing additional information about the Web Part. The file is displayed in a separate browser window when you click the Web Part title.

Description

Specifies the ScreenTip that appears when you rest the mouse pointer on the Web Part title or Web Part icon. The value of this property is used when you search for Web Parts by using the Search command on the Find Web Parts menu of the tool pane.

Help URL

Specifies the location of a file containing Help information about the Web Part. The Help information is displayed in a separate browser window when you click the Help command on the Web Part menu.

Help Mode

Specifies how a browser will display Help content for a Web Part.Select one of the following:Modal Opens a separate browser window, if the browser has this capability. A user must close the window before returning to the Web page.Modeless Opens a separate browser window, if the browser has this capability. A user does not have to close the window before returning to the Web page. This is the default value.Navigate Opens the Web page in the current browser window.

Note

Even though custom Microsoft ASP.NET Web Parts support this property, default SharePoint Help topics open only in a separate browser window.

Catalog Icon Image URL

Specifies the location of a file containing an image to be used as the Web Part icon in the Web Part List. The image size must be 16 by 16 pixels.

Title Icon Image URL

Specifies the location of a file containing an image to be used in the Web Part title bar. The image size must be 16 by 16 pixels.

Import Error Message

Specifies a message that appears if there is a problem importing the Web Part.