在 SharePoint Server 中設定跨網站發佈Configure cross-site publishing in SharePoint Server

摘要:了解如何建立和標示目錄內容的製作網站以及設定跨網站發佈的 SharePoint Server 2016 與 SharePoint Server 2013 的搜尋設定。Summary: Learn to create and tag catalog content in authoring sites and configure search settings for cross-site publishing in SharePoint Server 2016 and SharePoint Server 2013.

設定跨網站發佈前,請確定您了解的概念與術語中規劃 SharePoint Server 中的跨網站發佈Before you configure cross-site publishing, make sure that you understand the concepts and terminology in Plan for cross-site publishing in SharePoint Server.

開始之前Before you begin

注意

因為在網際網路資訊服務 (IIS) 網站執行 SharePoint Server、 系統管理員和使用者而定的瀏覽器提供的協助工具功能。SharePoint Server 支援支援的瀏覽器的協助工具功能。如需詳細資訊,請參閱下列資源: >規劃瀏覽器支援> SharePoint 2013 的協助工具> SharePoint 2013 產品的協助工具功能> 快速鍵> 觸控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: > Plan browser support> Accessibility for SharePoint 2013> Accessibility features in SharePoint 2013 Products> Keyboard shortcuts> Touch

建立跨網站發佈的網站集合Create site collections for cross-site publishing

若為跨網站集合發佈的狀況,且其中的內容是以跨網站集合的方式重複使用,您必須至少具有兩個網站集合:一個用於製作內容,另一個用於發佈內容。當您建立網站集合前,請先檢閱下列資訊:In a cross-site collection publishing scenario where content is reused across site collections, you must have at least two site collections, one for authoring content and one for publishing content. Before you create the site collections, review the following information:

如需如何使用管理中心或 Microsoft PowerShell 建立網站集合的資訊,請參閱建立 SharePoint Server 中的網站集合For information about how to create a site collection by using either Central Administration or Microsoft PowerShell, see Create a site collection in SharePoint Server.

啟用跨網站集合發佈功能Activate the Cross-Site Collection Publishing feature

您必須先在製作網站集合上啟用「跨網站集合發佈」功能,才能使用跨網站集合發佈,以重新使用跨網站集合的內容。Before you can use cross-site collection publishing to reuse content across site collections, you have to activate the Cross-Site Collection Publishing feature on the authoring site collection.

注意

若您已使用「產品目錄網站集合」範本來建立製作網站集合,則不必執行此作業。依預設,使用「產品目錄網站集合」範本來建立網站集合時,會啟用跨網站集合發佈功能。If you used the Product Catalog Site Collection template to create the authoring site collection, you do not have to do this operation. By default, the Cross-Site Collection publishing feature is active when you create a site collection by using the Product Catalog Site Collection template.

若要啟用跨網站集合發佈功能To activate the Cross-Site Collection Publishing feature

  1. 確認執行此程序的使用者帳戶為製作網站集合的網站集合管理員。Verify that the user account that performs this procedure is a site collection administrator on the authoring site collection.

  2. 製作的網站集合,在 [設定] 功能表上的頂層網站上按一下 [網站設定]。On the top-level site of the authoring site collection, on the Settings menu, click Site Settings.

  3. 按一下 [網站設定] 頁面上的 [網站集合管理] 區段中的 [網站集合功能]。On the Site Settings page, in the Site Collection Administration section, click Site collection features.

  4. 按一下 [網站集合功能] 頁面上的 [跨網站集合發佈] 旁的 [啟動]。On the Site Collection Features page, next to Cross-Site Collection Publishing, click Activate.

注意

停用的製作網站上的跨網站發佈功能就不會從發佈網站移除已連線目錄的內容。藉由停用此功能,您將不再能夠修改現有的目錄設定,或將其他發佈網站連線至該網站集合內的型錄。若要移除的發佈網站的連線的目錄內容,您必須中斷發佈網站與目錄。如需詳細資訊,請參閱 <中斷發佈網站與目錄Deactivating the Cross-Site Publishing feature on an authoring site will not remove the contents of a connected catalog from a publishing site. By deactivating this feature, you will no longer be able to modify existing catalog settings, or connect other publishing sites to catalogs within the site collection. To remove contents of a connected catalog from a publishing site, you have to disconnect the publishing site from the catalog. For more information, see Disconnect a publishing site from a catalog.

建立製作網站的內容Create content for authoring sites

建立製作網站的內容之前,請參閱 「 規劃用於製作網站上標示內容的字詞組 」 及製作網站的跨網站發佈的 SharePoint Server 的計劃中的 「 規劃製作網站的目錄內容 」。Before you create content for authoring sites, review "Plan term sets for tagging content on authoring sites" and "Plan catalog content for authoring sites" in Plan authoring sites for cross-site publishing in SharePoint Server.

建立及管理用於製作網站上標示內容的字詞組Create and manage term sets for tagging content on authoring sites

您可使用「字詞庫管理工具」來建立及管理字詞組。如需建立及管理字詞組的相關資訊,請參閱下列文章:You create and manage term sets by using the Term Store Management Tool. For information about how to create and manage term sets, see the following articles:

建立字詞組之後,您必須提供字詞組用於標示內容。如果您使用產品目錄網站集合範本來建立製作網站集合,而且您已在此網站集合中建立字詞組,則不必執行此作業。根據預設,在產品目錄網站集建立的新字詞組可用於標示內容。After you have created a term set, you have to make it available for tagging content. If you used the Product Catalog Site Collection template to create the authoring site collection, and you have created a term set in this site collection, you do not have to do this operation. By default, new term sets created in the Product Catalog site collection are available for tagging content.

若要將字詞組供用於標示內容To make a term set available for tagging content

  1. 確認執行此程序的使用者帳戶為 SharePoint 擁有者群組的成員,且該群組位於包含目錄的製作網站上。Verify that the user account that performs this procedure is a member of the Owners SharePoint group on the authoring site that contains the catalog.

  2. 在製作網站的 [設定] 功能表上按一下 [網站設定]。On the authoring site, on the Settings menu, click Site Settings.

  3. 按一下 [網站設定] 頁面上的 [網站管理] 區段中的 [字詞儲存管理]。On the Site Settings page, in the Site Administration section, click Term store management.

  4. 在 [分類法字詞庫] 區段中,按一下您想要讓可供標記字詞組。In the TAXONOMY TERM STORE section, click the term set that you want to make available for tagging.

  5. 按一下 [預訂的用途] 索引標籤,然後選取 [可供標記Click the INTEDED USE tab, and then select Available for Tagging.

  6. 按一下 [儲存]。Click Save.

使用 SharePoint 清單建立目錄內容Create catalog content by using SharePoint lists

當您使用 SharePoint 清單建立目錄內容時,我們建議您建立您要維護目錄內容的清單的網站欄。這是因為的網站欄自動建立 managed 的屬性,而且您可以在發佈網站上定義您目錄內容的查詢時使用這些 managed 的屬性。如果您有多個清單,則建議您先建立每個清單、 網站內容類型,然後將此網站內容類型至適當的網站欄建立關聯。如果您想要使用受管理的導覽在發佈網站上顯示目錄內容,您也必須建立至少一個字詞組中所述建立並管理製作網站上標示內容的字詞組。標記字詞組必須繫結至是受管理的中繼資料的資料類型的網站欄。When you create catalog content by using SharePoint lists, we recommend that you create site columns for the lists in which you want to maintain your catalog content. This is because managed properties are automatically created for site columns, and you can use these managed properties when defining queries for you catalog content on a publishing site. If you have several lists, we recommend that you create a site content type for each list, and then associate the appropriate site columns to this site content type. If you want to use managed navigation to display catalog content on a publishing site, you also have to create at least one term set as described in Create and manage term sets for tagging content on authoring sites. The tagging term set must be tied to a site column that is a Managed Metadata data type.

如需有關如何建立網站內容類型及網站欄的資訊,請參閱下列文章:For information about how to create site content types and site columns, see the following articles:

如果您有大量資料的外部商業系統中 — 例如 ERP 系統 — 考量此資料匯入一或多個 SharePoint 清單。SharePoint Server 沒有匯入清單內容的解決方案。不過,您可以開發自訂的匯入工具 — 例如,使用 Microsoft PowerShell。您可以使用匯入清單內容的跨網站發佈的範例 Microsoft PowerShell 指令碼集,請參閱匯入至 SharePoint 2013 preview 產品清單之清單內容。指令碼範例匯入內容僅使用產品目錄網站集合範本建立網站集合。If you have large amounts of data in external business systems — for example, an ERP system — consider importing this data into one or more SharePoint lists. SharePoint Server does not have a solution for importing list content. However, you can develop custom import tools — for example, by using Microsoft PowerShell. For a set of example Microsoft PowerShell scripts that you can use to import list content for cross-site publishing, see Import list content to Products list for SharePoint 2013 Preview. The example scripts import content only to a site collection that was created by using the Product Catalog Site Collection template.

將文件庫或清單共用為目錄Share a library or list as a catalog

在共用文件庫或清單作為目錄之前,請確認跨網站集合發佈功能已啟動網站集合。如果您的產品目錄網站集合範本建立網站集合,已使用中的跨網站集合發佈功能。所有其他類型的網站集合,必須先啟動 「 跨網站集合發佈功能才能繼續執行下列步驟。如需詳細資訊,請參閱本文稍早的啟用跨網站集合發佈功能Before you share a library or list as a catalog, verify that the Cross-Site Collection Publishing feature is activated for the site collection. If you used the Product Catalog Site Collection template to create the site collection, the Cross-Site Collection Publishing feature is already active. For all other types of site collections, you must activate the Cross-Site Collection Publishing feature before you can continue with the following steps. For more information, see Activate the Cross-Site Collection Publishing feature earlier in this article.

根據預設,當您將文件庫或清單共用為目錄時,就會啟用匿名存取。若您已將發佈網站連線至目錄,並且不想讓匿名使用者可以檢視及搜尋從此目錄新增至搜尋索引的內容,則您應該停用匿名存取。By default, anonymous access is enabled when you share a library or list as a catalog. If you have connected a publishing site to the catalog, and you don't want anonymous users to be able to view and search content that was added to the search index from this catalog, you should disable anonymous access.

重要

除了啟用匿名存取的目錄,您必須啟用匿名存取 web 應用程式與發佈網站,讓匿名使用者可以搜尋及檢視內容。如需詳細資訊,請參閱 < SharePoint Server 中的建立宣告式 web 應用程式In addition to enabling anonymous access for a catalog, you must enable anonymous access for the web application and publishing site so that anonymous users can search and view the content. For more information, see Create claims-based web applications in SharePoint Server.

若要以目錄形式共用文件庫或清單To share a library or list as a catalog

  1. 確認執行此程序的使用者帳戶是擁有者群組的成員,且該群組位於包含所要共用的文件庫或清單的網站上。Verify that the user account that performs this procedure is a member of the Owners group on the site that contains the library or list that you want to share.

  2. 瀏覽至您要共用的文件庫或清單,然後執行下列其中一項動作:Browse to the library or list that you want to share, and then do one of the following:

    • 若要共用文件庫,請按一下 [文件庫] 索引標籤,然後在 [設定] 群組中的功能區上按一下 [文件庫設定To share a library, click the LIBRARY tab, and then, on the ribbon, in the Settings group, click Library Settings.

    • 若要共用清單,請按一下 [清單] 索引標籤,然後在 [設定] 群組中的功能區上按一下 [清單設定To share a list, click the LIST tab, and then, on the ribbon, in the Settings group, click List Settings.

  3. 在 [設定] 頁面上的 [一般設定] 區段中按一下 [目錄設定On the Settings page, in the General Settings section, click Catalog Settings.

  4. 在 [目錄設定] 頁面上的 [目錄共用] 區段中選取啟用為目錄此文件庫] 核取方塊。On the Catalog Settings page, in the Catalog Sharing section, select the Enable this library as a catalog check box.

  5. 在 [匿名存取] 區段中,如果您想不想匿名使用者檢視及搜尋此內容,按一下 [停用匿名存取In the Anonymous Access section, if you want don't want anonymous users to view and search this content, click Disable anonymous access.

  6. 在 [目錄項目 URL 欄位] 區段的 [可用欄位] 方塊中選取可唯一識別文件庫或清單中的項目最多可以有五個欄位] 和 [新增]In the Catalog Item URL Fields section, in the Available fields box, select up to five fields that uniquely identify an item in the library or list, and then click Add.

    將發佈網站連接至此目錄後,您指定為目錄項目 URL 的欄位將會顯示為易記 URL 的一部分。(請參閱此程序後面的範例。)After you connect a publishing site to this catalog, the fields that you specified as catalog item URL fields appear as part of the friendly URL. (See the example that follows this procedure.)

  7. 導覽階層] 區段中選取您想要使用的導覽字詞組目錄頁面作為的字詞組與相關聯的資料行。發佈網站連線到此文件庫或清單中顯示目錄內容之後,您所選取的欄的值會顯示的易記 URL 的一部分 (請參閱下列範例會依照此程序)。In the Navigation Hierarchy section, select the column that is associated with the term set that you want to use as a navigation term set for catalog pages. After you connect a publishing site to this library or list to show catalog content, the value of the column that you selected appears as part of the friendly URL (see the example that follows this procedure).

    注意

    若要使用受管理導覽在發佈網站上顯示目錄內容,只需要在此區段中進行選取即可。You only have to make a selection in this section if you want to use managed navigation to display catalog content on a publishing site.

  8. 按一下 [ OK ]。Click OK.

    注意

    您在文件庫或清單作為目錄共用之後,必須進行編目包含目錄的內容來源。您不需要啟動完整編目。這是因為累加編目或連續編目也會將內容新增至搜尋索引。如需詳細資訊,請參閱 <啟動、 暫停、 繼續或停止 SharePoint Server 中的編目After you share a library or list as a catalog, the content source that contains the catalog must be crawled. You don't have to start a full crawl. This is because an incremental crawl or a continuous crawl also adds the content to the search index. For more information, see Start, pause, resume, or stop a crawl in SharePoint Server.

在此範例中,先假設您具有一個包含不同電子產品資料的清單。將清單共用為目錄時,會指定下列項目:In this example, let's say that you have a list that contains data for different electronic products. The following items were specified when the list was shared as catalog:

電子產品Electronic products

- <span data-ttu-id="1cfa5-199">音訊</span><span class="sxs-lookup"><span data-stu-id="1cfa5-199">Audio</span></span>
  • 汽車音響Car audio

  • MP3MP3

    • 電腦Computers
  • 筆記型電腦Laptops

  • 桌上型電腦Desktops

在 [共用] 清單中的每個項目相關聯此字詞組中項目的類別受管理的中繼資料網站欄的值。如需受管理的中繼資料欄的詳細資訊,請參閱建立受管理的中繼資料欄Each item in the shared list is associated with a value from this term set in the Item Category Managed Metadata site column. For more information about Managed Metadata columns, see Create a Managed Metadata column.

下列表格說明當您將發佈網站集合連接至此清單時,先前清單中的網站欄和其對應值如何結合來建立目錄內容的好記 URL。The following table describes how site columns and their corresponding values in the previous list are combined to create friendly URLs for catalog content when you connect a publishing site collection to this list.

產品標題Product title 項目類別Item Category 項目編號Item Number 目錄連接至發佈網站時的好記 URLFriendly URL to an item when the catalog is connected to a publishing site
Proseware 50W 汽車收音機Proseware 50W Car Radio
汽車音響 (Car audio)Car audio
10101011010101
<網站>/audio/car-audio/1010101<site>/audio/car-audio/1010101
Contoso 4GB 可攜式 MP3 播放器 M450Contoso 4GB Portable MP3 Player M450
MP3MP3
40201024020102
<網站>/audio/mp3/4020102<site>/audio/mp3/4020102
AdventureWorks 筆記型電腦 8.9 E0890AdventureWorks Laptop8.9 E0890
筆記型電腦 (Laptop)Laptops
70309067030906
<網站>/computers/laptops/7030906<site>/computers/laptops/7030906
WWI 桌上型電腦 PC2.33 X2330WWI Desktop PC2.33 X2330
桌上型電腦 (Desktop)Desktops
70309067030906
<網站>/computers/desktops/3030802<site>/computers/desktops/3030802

將字詞組供其他網站集合使用Make a term set available to other site collections

在製作網站集合上建立字詞組之後,您必須讓該字詞組可用於發佈網站集合。您可以將字詞組供所有網站集合或特定網站集合使用。After you create a term set on the authoring site collection, you have to make it available to publishing site collections. You can make a term set available to all site collections or to specific site collections.

若要將字詞組供所有網站集合To make a term set available to all site collections

  1. 確認執行此程序的使用者帳戶為 SharePoint 擁有者群組的成員,且該群組位於包含目錄的製作網站上。Verify that the user account that performs this procedure is a member of the Owners SharePoint group on the authoring site that contains the catalog.

  2. 在製作網站的 [設定] 功能表上按一下 [網站設定]。On the authoring site, on the Settings menu, click Site Settings.

  3. 按一下 [網站設定] 頁面上的 [網站管理] 區段中的 [字詞儲存管理]。如果執行此程序的使用者已經字詞庫管理員群組的成員,您可以跳至步驟 7。On the Site Settings page, in the Site Administration section, click Term store management. If the user that performs this procedure is already a member of the Term Store Administrators group, you can skip to step 7.

  4. 字詞庫管理工具],確認已選取 [受管理的中繼資料服務In the Term Store Management Tool, verify that Managed Metadata Service is selected.

  5. 在 [字詞庫管理員] 區段中,輸入一或多個使用者名稱。In the Term Store Administrator section, type one or more user names.

  6. 按一下 [儲存]。Click Save.

  7. Managed Metadata Service] 上按一下滑鼠右鍵,然後選取 [新增群組Right-click Managed Metadata Service, and then select New Group.

  8. 輸入您想要建立的全域字詞組的名稱,然後按EnterType the name of the global term set that you want to create, and then press Enter.

  9. 重新整理頁面。Refresh the page.

  10. 以滑鼠右鍵按一下您想要提供給所有的網站集合的字詞組] 和 [移動字詞組Right-click the term set that you want to make available to all site collections, and then click Move Term Set.

  11. 在 [移動字詞組] 對話方塊中,按一下 [全域字詞您想要移動字詞組、 設定,然後按一下 [確定]In the Term Set Move dialog box, click the global term set that you want to move the term set to, and then click OK.

  12. 重新整理頁面。Refresh the page.

    若要將字詞組供特定網站集合To make a term set available to specific site collections

  13. 確認執行此程序的使用者帳戶為 SharePoint 擁有者群組的成員,且該群組位於包含目錄的製作網站上。Verify that the user account that performs this procedure is a member of the Owners SharePoint group on the authoring site that contains the catalog.

  14. 在製作網站的 [設定] 功能表上按一下 [網站設定]。On the authoring site, on the Settings menu, click Site Settings.

  15. 按一下 [網站設定] 頁面上的 [網站管理] 區段中的 [字詞儲存管理]。On the Site Settings page, in the Site Administration section, click Term store management.

  16. 字詞庫管理工具] 按一下 [包含此網站集合中的所有字詞組的群組。In the Term Store Management Tool, click the group that contains all term sets within the site collection.

  17. 在 [網站集合存取] 區段中,輸入您要讓字詞組可供網站集合的 Url — 例如 http:///網站/產品。In the Site Collection Access section, type the URLs of the site collections to which you want to make the term set available — for example, http:///sites/products.

  18. 按一下 [儲存]。Click Save.

設定跨網站發佈的搜尋Configure search for cross-site publishing

由於跨網站發佈取決於搜尋,您必須建立內容來源及管理 SharePoint Server 跨網站發佈網站的編目。Because cross-site publishing depends on search, you have to create a content source and manage crawling for SharePoint Server cross-site publishing sites.

內容來源指定 what 時,以及如何應進行編目的內容。建立 Search service 應用程式之後,名為 [本機 SharePoint 網站的內容來源建立並自動設定為編目本機伺服器陣列中的所有 SharePoint Server 網站。您可以建立額外的內容來源以指定其他內容編目及定義 SharePoint Server 應該如何編目內容。您沒有建立目錄內容不同的內容來源以進行內容提供其他網站集合。不過,它會比較容易維護編目排程時您必須針對您想讓使用者檢視及搜尋不同內容不同的內容來源。A content source specifies what, when, and how content should be crawled. When a Search service application is created, a content source named Local SharePoint sites is created and is automatically configured to crawl all SharePoint Server sites in the local server farm. You can create additional content sources to specify other content to crawl and define how SharePoint Server should crawl that content. You do not have to create a separate content source for catalog content in order to make content available to other site collections. However, it is easier to maintain crawl schedules when you have separate content sources for the different content that you want users to view and search.

若要啟用連續編目的功能是 SharePoint Server 中新的編目排程] 選項。當您啟用連續編目時,對指定的內容來源中的內容進行任何變更會挑選自動編目程式使用並新增至搜尋索引。連續編目開始設定間隔。間隔的預設值為 15 分鐘,但是您可以設定使用 Microsoft PowerShell 進行較短的間隔的連續編目。The ability to enable continuous crawls is a new crawl schedule option in SharePoint Server. When you enable continuous crawls, any changes that are made to content within the specified content source is picked up automatically by the crawler and added to the search index. A continuous crawl starts at set intervals. The default interval is 15 minutes, but you can set continuous crawls to occur at shorter intervals by using Microsoft PowerShell.

如需如何建立新的內容來源及管理編目管理中心的資訊,請參閱下列文章:For information about how to create a new content source and manage crawling in Central Administration, see the following articles:

重新索引目錄內容Reindex catalog content

有些動作 — 例如,執行動作以啟用精簡器的搜尋結構描述管理 — 需要包含要新增至搜尋索引之變更的類別目錄的內容來源的完整重新索引。網站集合管理員可以獨立搜尋服務應用程式管理員指出該目錄應該完全大致目錄下一個排程編目期間。Some actions — for example, doing search schema management to enable refiners — require a full reindex of the content source that contains the catalog for the changes to be added to the search index. A site collection administrator can independently of the Search service application administrator indicate that a catalog should be fully reindexed during the next scheduled crawl of the catalog.

若要重新索引目錄內容To reindex catalog content

  1. 確認執行此程序的使用者帳戶為網站集合管理員群組的成員,且該群組位於包含目錄的網站上。Verify that the user account that performs this procedure is a member of the Site collection administrators group on the site that contains the catalog.

  2. 瀏覽至目錄,然後執行下列其中一項作業:Browse to the catalog, and then do one of the following:

    • 如果您想要執行目錄完整編目文件庫中,按一下 [文件庫] 索引標籤和功能區上,在 [設定] 群組中 [文件庫設定If you want to perform a full crawl of a catalog in a library, click the LIBRARY tab, and then, on the ribbon, in the Settings group, click Library Settings.

    • 如果您想要執行目錄完整編目] 清單中,按一下 [清單] 索引標籤,然後在 [設定] 群組中的功能區上按一下 [清單設定If you want to perform a full crawl of a catalog in a list, click the LIST tab, and then, on the ribbon, in the Settings group, click List Settings.

  3. 在 [設定] 頁面上的 [一般設定] 區段中按一下 [進階的設定]。On the Settings page, in the General Settings section, click Advanced settings.

  4. 在 [進階設定] 頁面上的 [清單重新編製索引] 區段中按一下 [重新編製索引的清單,和 [重新編製索引的清單,以確認您想重新編製索引在下一個排程編目期間目錄。On the Advanced Settings page, in the Reindex List section, click Reindex List, and then click Reindex List to confirm that you want the catalog to be reindexed during the next scheduled crawl.

  5. 按一下 [ OK ]。Click OK.

    注意

    完整的目錄重新索引將會在下一個排程編目期間執行。The full reindex of the catalog will be performed during the next scheduled crawl.

另請參閱See also

概念Concepts

在 SharePoint Server 中自動建立 managed 的屬性Automatically created managed properties in SharePoint Server