在 SharePoint Server 中管理查詢建議Manage query suggestions in SharePoint Server

摘要:查詢建議是當使用者開始輸入查詢時,您要搜尋系統向使用者建議的片語。本文說明如何開啟或關閉查詢建議。另外解釋如何將片語新增至自動查詢建議。以及您如何新增不應作為查詢建議的片語。Summary: Query suggestions are phrases that you want the search system to suggest to users as they start typing a query. This article explains how to switch query suggestions on or off. It also explains how you can add phrases to the automatic query suggestions, and how you can add phrases that should not be used as query suggestions.

查詢建議藉由顯示與正在輸入的查詢類似的查詢,從而協助使用者快速找到資訊。例如,當使用者開始輸入 "sales" 時,他們可從 [搜尋] 方塊下方的清單挑選常用的 sales 相關查詢。Query suggestions help users find information quickly by showing queries that might be similar to the one they're typing. For example, as users start to type "sales", they may be able to pick common sales-related queries from a list below the Search Box.

當使用者已點選查詢的一或多個結果至少六次時,搜尋系統會自動為該查詢建立建議。搜尋系統會針對每個結果來源和每個網站集合,每日產生查詢建議。因此,自動產生的查詢建議可能依不同的結果來源和網站集合而不同。The search system automatically creates suggestions for a query when users have clicked one or more of the results for that query at least six times. The query suggestions are generated daily for each result source and for each site collection, so the automatic query suggestions can be different for different result sources and site collections.

當您依照本文的步驟手動新增應該或不應作為查詢建議的片語時,查詢建議會套用至 所有 結果來源和 所有 網站集合。When you follow the steps in this article to manually add phrases that should or shouldn't be used as query suggestions, the query suggestions apply to all result sources and all site collections.

新增一律或永不做為查詢建議的片語Add phrases that should always or never be used as query suggestions

若要新增片語,使得使用者在開始輸入查詢時,讓系統一律或永不建議這些片語給使用者,您必須先建立一或多個文字檔來包含這些片語,然後將檔案匯入搜尋系統。To add phrases that you want the search system to always or never suggest to users as they start typing a query, you have to create one or several text files that contain these phrases, and then import the files into the search system.

您應建立不同的文字檔案要永遠建議、 片語及您想要永不建議的片語。如果您想要新增多個語言的查詢建議,您也應該建立每種語言的個別檔案。語言會決定如何查詢建議處理內部搜尋系統,但建議一律顯示或隱藏所有語言為使用者輸入查詢的所有查詢。將每個片語新增為您建立的文字檔案中的個別列並將檔案儲存在 utf-8 編碼。You should create separate text files for the phrases that you want to always be suggested, and for the phrases that you want to never be suggested. If you want to add query suggestions for multiple languages, you should also create separate files per language. The language determines how the query suggestions are processed internally in the search system, but all query suggestions are always displayed or suppressed for all languages as users enter their queries. Add each phrase as a separate line in the text file that you create, and save the file in UTF-8 encoding.

警告

[!注意] 當您匯入含查詢建議片語的文字檔時,會覆寫搜尋系統中任何現有的手動查詢建議。不會覆寫自動查詢建議。若要編輯現有的手動查詢建議或新增查詢建議,您應該先將現有的查詢建議匯出到文字檔,然後更新和重新匯入該檔案。When you import a text file with phrases for query suggestions, you overwrite any existing manual query suggestions in the search system. The automatic query suggestions are not overwritten. If you want to edit existing manual query suggestions or add new ones, you should first export the existing query suggestions to a text file, and then update and re-import that file.

新增應該一律用做查詢建議的片語To add phrases that should always be used as query suggestions

  1. 確認執行此程序的使用者帳戶是否為 Search Service 應用程式的管理員。Verify that the user account that is performing this procedure is an administrator for the Search service application.

  2. 開啟查詢建議設定」 頁面。Open the Query Suggestion Settings page.

    • 按一下 [SharePoint 管理中心網站的 [應用程式管理] 區段中的 [首頁] 頁面上的 [管理服務應用程式]。On the home page of the SharePoint Central Administration website, in the Application Management section, click Manage service applications.

    • 在 [管理服務應用程式] 頁面上,按一下 [Search service 應用程式。On the Manage Service Applications page, click the Search service application.

    • 按一下 [搜尋管理] 頁面的 [查詢與結果] 區段的 [查詢建議]。查詢建議設定] 頁面隨即開啟。On the Search Administration Page, in the Queries and Results section, click Query Suggestions. The Query Suggestion Settings page opens.

  3. 在 [建議片語的語言] 區段中,選取您一律要建議的查詢建議處理語言。In the Language for suggestion phrases section, select the processing language for the query suggestions that you always want to suggest.

  4. 一律建議片語] 區段中按一下 [從文字檔匯入]。瀏覽至您要匯入並按一下 [確定]檔案。In the Always suggest phrases section, click Import from text file. Browse to the file that you want to import and click OK.

  5. 按一下 [儲存設定Click Save Settings.

注意

如果您想要編輯現有的手動查詢建議或加入新的、 按一下 [匯出至檔案、 更新的文字檔案並再重新匯入。若要移除所有的手動查詢建議上, 傳以空白的文字檔案。If you want to edit existing manual query suggestions or add new ones, click Export to file, update the text file and then re-import it. To remove all manual query suggestions, upload an empty text file.

新增應該永不用做查詢建議的片語To add phrases that should never be used as query suggestions

  1. 確認執行此程序的使用者帳戶是否為 Search Service 應用程式的管理員。Verify that the user account that is performing this procedure is an administrator for the Search service application.

  2. 開啟查詢建議設定」 頁面。Open the Query Suggestion Settings page.

    • 按一下 [SharePoint 管理中心網站的 [應用程式管理] 區段中的 [首頁] 頁面上的 [管理服務應用程式]。On the home page of the SharePoint Central Administration website, in the Application Management section, click Manage service applications.

    • 在 [管理服務應用程式] 頁面上,按一下 [Search service 應用程式。On the Manage Service Applications page, click the Search service application.

    • 按一下 [搜尋管理] 頁面的 [查詢與結果] 區段的 [查詢建議]。查詢建議設定] 頁面隨即開啟。On the Search Administration Page, in the Queries and Results section, click Query Suggestions. The Query Suggestion Settings page opens.

  3. 在 [建議片語的語言] 區段中,選取您永不建議的查詢建議處理語言。In the Language for suggestion phrases section, select the processing language for the query suggestions that you never want to suggest.

  4. 永不建議片語] 區段中按一下 [從文字檔匯入]。瀏覽至您要匯入並按一下 [確定]檔案。In the Never suggest phrases section, click Import from text file. Browse to the file that you want to import and click OK.

  5. 按一下 [儲存設定Click Save Settings.

注意

如果您想要編輯現有的手動查詢建議或加入新的、 按一下 [匯出至文字檔、 更新的文字檔案並再重新匯入。若要移除所有的手動查詢建議上, 傳以空白的文字檔案。If you want to edit existing manual query suggestions or add new ones, click Export to text file, update the text file and then re-import it. To remove all manual query suggestions, upload an empty text file.

開啟或關閉查詢建議Switch query suggestions on or off

預設會開啟查詢建議。下列步驟說明如何開啟或關閉查詢建議。Query suggestions are turned on by default. The following steps explain how to turn query suggestions on or off.

啟用或停用查詢建議To enable or disable query suggestions

  1. 確認執行此程序的使用者帳戶是否為 Search Service 應用程式的管理員。Verify that the user account that is performing this procedure is an administrator for the Search service application.

  2. 開啟查詢建議設定」 頁面。Open the Query Suggestion Settings page.

    • 按一下 [SharePoint 管理中心網站的 [應用程式管理] 區段中的 [首頁] 頁面上的 [管理服務應用程式]。On the home page of the SharePoint Central Administration website, in the Application Management section, click Manage service applications.

    • 在 [管理服務應用程式] 頁面上,按一下 [Search service 應用程式。On the Manage Service Applications page, click the Search service application.

    • 按一下 [搜尋管理] 頁面的 [查詢與結果] 區段的 [查詢建議]。查詢建議設定] 頁面隨即開啟。On the Search Administration Page, in the Queries and Results section, click Query Suggestions. The Query Suggestion Settings page opens.

  3. 在 [搜尋建議] 區段中執行下列其中一項:In the Search Suggestions section, do one of the following:

    • 若要啟用查詢建議,請核取 [顯示搜尋建議] 核取方塊。To enable query suggestions, check the Show search suggestions check box.

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

  4. 按一下 [儲存設定Click Save Settings.