在 SharePoint Server 中設定搜尋方塊網頁組件的屬性Configure properties of the Search Box Web Part in SharePoint Server

摘要: 了解如何設定「搜尋方塊網頁組件」的屬性。Summary: Learn how to configure properties of the Search Box Web Part.

根據預設,「搜尋方塊網頁組件」會在搜尋中心的首頁 (default.aspx) 以及所有搜尋結果頁面上 (results.aspx、peopleresults.aspx、conversationresults.aspx、videoresults.aspx) 上使用。變更「搜尋方塊網頁組件」中的屬性,可讓您執行下列作業:By default, the Search Box Web Part is used on the home page for the Search Center (default.aspx), and all search results pages (results.aspx, peopleresults.aspx, conversationresults.aspx, videoresults.aspx). By changing properties in the Search Box Web Part you can you can do the following:

  • 變更搜尋結果顯示所在的網頁組件或頁 - 如自訂「搜尋結果網頁組件」或自訂搜尋結果頁面。Change the Web Part or page where the search results should be displayed — for example, a custom Search Results Web Part or a custom search results page.

  • 關閉查詢建議與人員建議。如需查詢建議的詳細資訊,請參閱在 SharePoint Server 中管理查詢建議Turn off query suggestions and people suggestions. For more information about query suggestions, see Manage query suggestions in SharePoint Server

  • 顯示搜尋喜好設定頁面與進階搜尋頁面的連結。Display links to a search preference page and an advanced search page.

  • 變更套用至網頁組件的顯示範本。Change the display template that is applied to the Web Part.

開始之前Before you begin

注意

因為 SharePoint Server 在 Internet Information Services (IIS) 中以網站形式運作,所以管理員與使用者均依賴瀏覽器提供的協助工具功能。SharePoint Server 支援所支援瀏覽器的協助工具功能。如需詳細資訊,請參閱下列資源:Because SharePoint Server runs as websites in Internet Information Services (IIS), administrators and users depend on the accessibility features that browsers provide. SharePoint Server supports the accessibility features of supported browsers. For more information, see the following resources:

設定搜尋方塊網頁組件的屬性Configure properties of the Search Box Web Part

設定搜尋方塊網頁組件的屬性To configure the properties of a Search Box Web Part

  1. 確認執行此程序的使用者帳戶為企業搜尋中心網站上設計者 SharePoint 群組的成員。Verify that the user account that performs this procedure is a member of the Designers SharePoint group on the Enterprise Search Center site.

  2. 在 [搜尋中心] 網站首頁上按一下 [設定]**** 功能表,然後按一下 [編輯頁面]*On the Search Center site home page, click the *Settings menu, and then click Edit Page.

  3. 在 [網頁組件] 中按一下 [搜尋方塊網頁組件功能表]**** 箭號,然後按一下 [編輯網頁組件]*In the Web Part, click the *Search Box Web Part Menu arrow, and then click Edit Web Part.

  4. 在 [網頁組件] 工具窗格的 [搜尋方塊的屬性]**** 區段中,展開 [查詢應送至哪個搜尋結果頁面]**** 區段,然後執行下列動作:In the Web Part tool pane, in the Properties for Search Box section, expand the Which search results page should queries be sent to section, and then do the following:

    • 若要顯示定義於 [搜尋設定] 頁面上的設定,請選取 [使用此網站的搜尋設定]**** 核取方塊。To display the settings that are defined on the Search Settings page, select the Use this site's Search Settings check box.

    • 若要覆寫定義於 [搜尋設定] 頁面上的設定,請清除 [使用此網站的搜尋設定]**** 核取方塊,然後執行下列動作:To override the settings that are defined on the Search Settings page, clear the Use this site's Search Settings check box, and then do the following:

      • 若要在頁面上的網頁組件中顯示搜尋結果,請在 [將查詢傳送至此頁面的其他網頁組件]**** 區段中選取網頁組件。To display search results in a Web Part on the page, in the section Send queries to other Web Parts on this page, select a Web Part.

        注意

        若頁面上沒有其他網頁組件,搜尋結果將會傳送至 [搜尋設定] 頁面上指定的搜尋結果頁面。If there are no other Web Parts on a page, search results will be sent to the search results page as specified on the Search Settings page.

    • 若要將查詢傳送至自訂搜尋結果頁面,請選取 [將查詢傳送至自訂結果頁面 URL]*,然後輸入自訂搜尋結果頁面的 URL。To send queries to a custom search results page, select *Send queries to a custom results page URL, and then type the URL of the custom search results page.

      注意

      您無法傳送查詢到使用易記 URL 的自訂搜尋結果頁面。You can't send queries to a custom search results page that uses a friendly URL.

  5. 在 [網頁組件] 工具窗格的 [搜尋方塊的屬性]**** 區段中,展開 [查詢建議]**** 區段,然後執行下列動作:In the Web Part tool pane, in the Properties for Search Box section, expand the Query Suggestions section, and then do the following:

    • 若要停用查詢建議,請清除 [顯示建議]**** 核取方塊。To disable query suggestions, clear the Show suggestions check box.

    • 若要為查詢建議指定其他屬性,請變更下列欄位中的值:To specify additional properties for query suggestions, change the values in the following fields:

      • 查詢建議數目: 要顯示多少個查詢建議。Number of query suggestions: How many query suggestions to display.

      • 字元數下限: 使用者至少須輸入多少個字元後才會顯示查詢建議。Minimum number of characters: How many characters the user must type before query suggestions are displayed.

      • 建議延遲 (以毫秒為單位): 經過多少毫秒後會顯示查詢建議。Suggestions delay (in milliseconds): How many milliseconds elapse before query suggestions are displayed.

      • 個人最愛數目: 在搜尋結果中的 [要再搜尋一次嗎?]**** 文字下方顯示多少個查詢建議供使用者參考。這些建議會以使用者先前點選過的搜尋結果為基礎。若要停用個人最愛結果,請清除 [顯示個人最愛結果]**** 核取方塊。** Number of personal favorites:** How many query suggestions are displayed to the user under the text Are you looking for these again? in the search results. These suggestions are based on search results that the user has clicked previously. To disable personal favorite results, clear the Show personal favorite results check box.

    • 若要開啟人員名稱建議,請選取 [顯示人員名稱建議]*To turn on people name suggestions, select *Show people name suggestions.

  6. 在 [網頁組件] 工具窗格的 [搜尋方塊的屬性]**** 區段中,展開 [設定]**** 區段,然後執行下列動作:In the Web Part tool pane, in the Properties for Search Box section, expand the Settings section, and then do the following:

    • 若要顯示搜尋喜好設定頁面的連結,請選取 [顯示喜好設定連結]*To show a link to a search preference page, select *Show preferences link.

    • 若要顯示進階搜尋頁面的連結,請選取 [顯示進階連結]*,然後在 [進階搜尋頁面 URL]* 方塊中輸入所要連結到的進階搜尋頁面的 URL。To show a link to an advanced search page, select Show advanced link, and then in the Advanced search page URL box, type the URL of the advanced search page that you want to link to.

    • 若要套用其他顯示範本,請在 [搜尋方塊控制項顯示範本]**** 清單中選取要套用至網頁組件的顯示範本。To apply another display template, in the Search box control Display Template list, select the display template that you want to apply to the Web Part.

    • 選取 [載入頁面時,使搜尋方塊成為焦點]**** 核取方塊,可讓使用者在頁面載入時立即在搜尋方塊中輸入查詢,而無須先點選搜尋方塊。依預設會選取此選項。Select the Make the search box have focus when the page is loaded check box to make it possible for users to immediately type a query in the search box when the page is loaded without first having to click the search box. By default, this is selected.

另請參閱See also

如何變更 SharePoint Server 2013 中搜尋方塊網頁組件所顯示的文字How to change the text that is displayed in the Search Box Web Part in SharePoint Server 2013