建立和匯入 SharePoint Server 中的查詢建議Create and import query suggestions in SharePoint Server

摘要:了解如何匯入 SharePoint Server 2016 和 SharePoint Server 2013 中的查詢建議。Summary: Learn how to import query suggestions in SharePoint Server 2016 and SharePoint Server 2013.

簡單的方法來協助使用者搜尋的 SharePoint Server 中的資訊是建立查詢建議。查詢建議是為使用者輸入查詢的搜尋方塊下方顯示的文字。An easy way to help users search for information in SharePoint Server is to create query suggestions . Query suggestions are words that appear under the search box as users type a query.

查詢建議

SharePoint Server 會自動建立查詢建議使用者已按一下搜尋結果的查詢至少六次時。例如,如果使用者已輸入的查詢單字"咖啡",然後按下的搜尋結果上六次然後"咖啡 」 會自動成為查詢建議。我們也可以建立查詢拼字建議以手動方式。在本文中,我們將使用的簡單範例示範如何執行這項作業。SharePoint Server automatically creates a query suggestion when users have clicked a search result for a query at least six times. For example, if users have entered the query word "coffee" and then clicked on a search result six times, then "coffee" automatically becomes a query suggestion. We can also create query spelling suggestions manually. In this article, we'll use a simple example to show how to do this.

在本文中,您將了解:In this article, you'll learn:

如何建立查詢建議檔案How to create a query suggestions file

  1. 開啟文字編輯器,例如 [記事本]。Open a text editor, for example Notepad.

  2. 輸入您想要新增查詢拼字建議。新增一個的單字或片語每行。Enter the query spelling suggestions that you want to add. Add one word or phrase per line.

    查詢建議清單

  3. 將檔案儲存為.txt檔案和編碼utf-8Save the file as a .txt file and encoding UTF-8.

    另存為 TXT 檔案

現在您已為查詢建議檔案下, 一個工作就是匯入 SharePoint Server。Now that you have a query suggestions file, the next task is to import it to SharePoint Server.

如何匯入至 SharePoint Server 的查詢建議檔案How to import a query suggestions file to SharePoint Server

  1. 從 Office 365 系統管理員] 功能表選取 [ SharePoint]。From the Office 365 Admin menu, select SharePoint.

    SharePoint 功能表

  2. SharePoint 系統管理中心中,選擇 [搜尋]On the SharePoint admin center, select search.

    按一下 [搜尋]

  3. 在 [搜尋管理] 頁面上選取 [查詢建議設定On the search administration page, select Query Suggestion Settings.

    選取查詢建議設定

  4. [建議片語的語言] 區段中選取查詢建議的語言。一律建議片語] 區段中選取 [從文字檔匯入]In the Language for suggestions phrases section, select the language of your query suggestions. In the Always suggest phrases section, select Import from text file.

    從文字檔匯入

  5. 具有片語的文字檔] 區段中選取 [選擇檔案],並匯入您的查詢建議檔案。In the Text file that has phrases section, select Choose File, and import your query suggestions file.

    匯入查詢建議檔案

  6. 選取[確定],然後儲存設定Select OK, and then Save Settings.

    按一下 [儲存設定]

重要

當您匯入查詢建議時,會覆寫現有的查詢建議。如果您先前尚未匯入任何查詢建議,您必須 nothing 擔心。自動建立的查詢建議將不會覆寫當您匯入新的。但是,如果您想要匯入其他查詢建議,您應該將匯出的現有的查詢建議檔案、 更新,並再重新匯入。When you import query suggestions, existing query suggestions are overwritten. If you haven't previously imported any query suggestions, you have nothing to worry about. Automatically created query suggestions will not be overwritten when you import new ones. But, if you want to import additional query suggestions, you should export the existing query suggestions file, update it, and then reimport it.

如何匯入至 SharePoint Server 的查詢建議檔案How to import a query suggestions file to SharePoint Server

  1. 移至 [管理中心 --> 管理服務應用程式 --> Search Service 應用程式 --> 查詢建議Go to Central Administration --> Manage service applications --> Search Service Application --> Query Suggestions.

  2. 在 [查詢建議設定] 頁面一律建議時期] 區段中選取 [匯入文字檔案中On the Query Suggestion Settings page, in the Always suggest phases section, select Import from text file.

    從文字檔匯入

  3. 匯入查詢建議的片語] 頁面上選取 [瀏覽],並匯入您的查詢建議檔案。On the Import phrases for query suggestions page, select Browse, and import your query suggestions file.

    選取瀏覽

  4. 選取[確定],然後儲存設定Select OK, and then Save Settings.

    儲存設定

重要

當您匯入查詢建議時,會覆寫現有的查詢建議。如果您先前尚未匯入任何查詢建議,您必須 nothing 擔心。當您匯入新的將不會覆寫建議的查詢會自動建立。但是,如果您想要匯入其他查詢建議,您應該將匯出的現有的查詢建議檔案、 更新,並再重新匯入。When you import query suggestions, existing query suggestions are overwritten. If you haven't previously imported any query suggestions, you have nothing to worry about. Automatically created query suggestions won't be overwritten when you import new ones. But, if you want to import additional query suggestions, you should export the existing query suggestions file, update it, and then reimport it.

若要確認您的查詢建議的運作方式How to verify that your query suggestions are working

重要

您已上傳您的查詢建議檔案之後,可能需要一些時間才會顯示查詢建議。After you have uploaded your query suggestions file, it might take some hours before your query suggestions are displayed.

若要確認您的查詢建議均運作正常,搜尋方塊中,輸入您的查詢建議檔案中的片語的兩個字母。在 [搜尋] 方塊會顯示查詢建議。To verify that your query suggestions are working correctly, in a search box, type two letters of a phrase from your query suggestions file. The query suggestions appear under the search box.

查詢建議

查詢建議

另請參閱See also

概念Concepts

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

其他資源Other Resources

自訂 SharePoint 搜尋查詢建議Customize query suggestions in SharePoint search