階段 14: SharePoint Server 中設定多面向導覽的精簡器Stage 14: Configure refiners for faceted navigation in SharePoint Server

摘要:了解如何在 SharePoint Server 2016 中設定多面向導覽的精簡器。Summary: Learn how to configure refiners for faceted navigation in SharePoint Server 2016.

注意

大部分的這一系列中所述的功能是僅適用於 SharePoint Online 中的私人每個網站集合。Most of the features described in this series are available only for private sites collections in SharePoint Online.

快速概觀Quick overview

上述這一系列的階段,我們會被識別我們想要使用的多層面導覽的精簡器。我們也會識別我們想要用以顯示這些精簡器的精簡器啟用 managed 的屬性。In previous stages of this series, we identified the refiners we wanted to use for faceted navigation. We also identified which refiner-enabled managed properties we wanted to use to display these refiners.

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

  1. 如何將編目的屬性對應至將精簡器啟用的 managed 屬性How to map a crawled property to a refiner-enabled managed property

  2. 如何啟動目錄重新索引How to initiate a reindexing of the catalog

  3. 如何確認的字詞組可以用於多面向導覽How to verify that the term set can be used for faceted navigation

  4. 如何將精簡器新增到字詞組中的所有字詞How to add refiners to all terms in a term set

  5. 如何將精簡器新增到字詞組中的特定字詞How to add refiners to specific terms in a term set

編目的屬性、 managed 的屬性及自動建立的 managed 的屬性上快速重新整理,請參閱從 managed 屬性集的網站欄功能的?For a quick refresh on crawled properties, managed properties, and automatically created managed properties, see From site column to managed property - What's up with that?.

啟動階段 14Start stage 14

如何將編目的屬性對應至將精簡器啟用的 managed 屬性How to map a crawled property to a refiner-enabled managed property

我們並未從規劃階段 13: 規劃使用 SharePoint Server-第 ii 部分中的多層面導覽的精簡器,我們知道我們想要使用下列的精簡器啟用 managed 的屬性的 「 音訊 」 及 「 相機 」 類別:From the planning we did in Stage 13: Plan to use refiners for faceted navigation in SharePoint Server - Part II, we know we want to use the following refiner-enabled managed properties for the "Audio" and "Cameras" categories:

若要使用的精簡器Refiner to use Managed 屬性名稱Managed property name
PricePrice
RefinableInt01RefinableInt01
品牌Brand
RefinableString01RefinableString01
色彩Color
RefinableString02RefinableString02
縮放Zoom
RefinableString03RefinableString03
螢幕大小Screen size
RefinableString04RefinableString04
巨型像素Mega pixels
RefinableString05RefinableString05
最大 ISOMax ISO
RefinableString06RefinableString06

若要將編目的屬性對應到精簡器啟用的 managed 屬性的程序是我們想要使用的精簡器相同。下面的程序說明如何執行這項作業的價格精簡器。更明確解釋如何對應編目的屬性至RefinableInt01 managed 屬性代表價格The procedure to map a crawled property to a refiner-enabled managed property is the same for all the refiners we want to use. The procedure below explains how to do this for the Price refiner. More specifically, it explains how to map the crawled property that represents Price to the RefinableInt01 managed property.

重要

雖然在發佈網站上顯示精簡器,您必須在製作網站上進行設定。Although refiners are displayed on the publishing site, you have to configure them on the authoring site .

之間的不同網站集合次可以有點混淆。發佈網站及製作網站上幾乎完全相同的 Ui 外觀不會說明事實。因此,如果您進行錯誤第一次您達成此目的,您正處於良好的公司 !Juggling between the different site collections can be a bit confusing. The fact that the UIs look almost identical on the publishing site and the authoring site doesn't help. Therefore, if you make a mistake the first time that you do this, you're in good company!

以下移 !Here we go!

  1. 製作網站,在 [網站設定] 頁面上按一下 [搜尋結構描述On your authoring site , on the Site Settings page, click Search Schema.

    Search Schema

  2. 在 [ Managed 屬性] 欄位中輸入的精簡器啟用 managed 屬性要對應的編目的屬性名稱和 [箭號] 按鈕。在 Contoso 案例中,我們將輸入RefinableInt01In the Managed property field, type the name of the refiner-enabled managed property to which you want to map a crawled property, and then click the arrow button. In our Contoso scenario, we'll type RefinableInt01 .

    已啟用精簡器 Managed 屬性

  3. 從 [屬性名稱] 功能表中選取 [編輯/對應屬性From the Property Name menu, select Edit/Map Property.

    Edit Property

  4. 在 [編輯 Managed 屬性] 頁面上按一下 [新增對應]。On the Edit Managed Property page, click Add a Mapping.

    新增對應

  5. 編目屬性選項] 對話方塊中,使用 [搜尋編目的屬性名稱] 欄位來搜尋您想要對應至這個 managed 屬性的編目屬性。In the Crawled property selection dialog box, use the Search for a crawled property name field to search for the crawled property that you want to map to this managed property.

    我們 Contoso 類別目錄中包含價格資訊的網站欄會呼叫"RetBasePrice"、 讓此欄位中輸入搜尋編目的屬性名稱,並再按一下 [尋找]。In our Contoso catalog, the site column that contains the price information is called "RetBasePrice", so enter this in the Search for a crawled property name field, and then click Find.

    尋找 CP

兩個編目的屬性找到: ows_q_NMBR_RetBasePriceows_RetBasePriceTwo crawled properties are found: ows_q_NMBR_RetBasePrice and ows_RetBasePrice .

 ![Two CPs Found](../media/OTCSP_TwoCPsFound.png)

此組件是真正的麻煩。不只兩個編目的屬性找到 (非常異常、 考慮我們只需要一個"RetBasePrice"網站欄),但哪一種應該我們將對應到可精簡搜尋的 managed 屬性?This part is really tricky. Not only are two crawled properties found (very strange, considering we only had one "RetBasePrice" site column), but which one should we map to the refinable managed property?

Let's take a closer look at what's going on. [From site column to managed property - What's up with that?](from-site-column-to-managed-propertywhat-s-up-with-that.md) explained the naming convention for automatically created crawled properties. All automatically created crawled property names have the format  *ows_\<something\>_SiteColumnName*  . For the site column  *RetBasePrice*  , the  *\<something\>*  is "q_NMBR". Based on this information,  *ows_q_NMBR_RetBasePrice*  can be identified as an automatically created managed property. 

To differentiate the two crawled properties found by our search, let's call the one whose name does not have the format of an automatically created managed property ( *ows_RetBasePrice*  in this example) a  *regular*  crawled property. 

> [!IMPORTANT]
> When mapping a crawled property to a refinable managed property, select the  *regular*  crawled property! 
  1. 選取您在先前步驟中,執行並再按一下 [確定]搜尋所找到的一般編目的屬性。在 Contoso 案例中,我們將會選取ows_RetBasePriceSelect the regular crawled property found by the search you performed in the previous step, and then click OK. In our Contoso scenario, we'll select ows_RetBasePrice .

    選取 CP

在 [編輯 Managed 屬性] 頁面中,注意到編目的屬性ows_RetBasePrice會新增至 [對應至編目屬性] 欄位。On the Edit Managed Property page, notice that the crawled property ows_RetBasePrice is added to the Mappings to crawled properties field.

 ![CP Added](../media/OTCSP_CPadded.png)
  1. 在 [別名] 欄位中輸入精簡器的名稱。在 Contoso 案例中,我們將輸入價格In the Alias field, type a name for the refiner. In our Contoso scenario, we'll type Price .

    別名欄位

    重要

    您在此處輸入別名是*會顯示我們發佈網站的精簡器名稱。此別名為了方便我們的生活的位元時我們要設定多面向導覽的精簡器 (程序,將會說明如何執行這項作業)。請記住,我們將無法變更可精簡搜尋的 managed 屬性的名稱。因此時進行設定,我們必須處理許多可精簡搜尋的 managed 屬性具有類似的名稱 ( *RefinableString01RefinableString02 )。所以此別名做為良好提醒的對應到屬性。The alias that you enter here is not the refiner name that will be shown on our publishing site. This alias is intended to make our lives a bit easier while we are configuring refiners for faceted navigation (procedures that follow will explain how to do this). Remember, we can't change the name of the refinable managed property. Therefore, when doing the configuration, we must deal with many refinable managed properties that have similar names ( RefinableString01 , RefinableString02 , etc.). So this alias serves as a good reminder of what we mapped to the property.

  2. 若要完成對應,按一下 [確定]To finish the mapping, click OK.

    完成對應

在此程序的開頭另有說明,我們必須執行我們想要使用的精簡器的對應。如此,「 音訊 」 及 「 相機 」 類別我們對應至編目屬性至RefinableStringXX可精簡搜尋 managed 屬性,如下列螢幕擷取畫面所示。As stated at the beginning of this procedure, we have to do the mapping for all the refiners we want to use. So, for the "Audio" and "Cameras" categories we have mapped crawled properties to the RefinableStringXX refinable managed properties, as shown in the following screen shot.

 ![Refinable String Mapped](../media/OTCSP_RefinableStringMapped.png)

如何啟動目錄重新索引How to initiate a reindexing of the catalog

現在,我們已對應所有精簡器啟用 managed 的屬性,我們想要使用,我們已啟動目錄重新索引。我們說明如何執行中的目錄重新索引階段 4: 設定搜尋與啟用在 SharePoint Server 中的目錄內容的編目Now that we've mapped all the refiner-enabled managed properties that we want to use, we have to initiate a reindexing of the catalog. We described how to do a reindexing of the catalog in Stage 4: Set up search and enable the crawling of your catalog content in SharePoint Server.

注意

使用管理中心存取權的 search service 應用程式管理員可以執行同樣的事情開始完整編目,如何啟動目錄重新索引所述。Search service application administrators with access to Central Administration can do the same thing by starting a full crawl, as explained in How to initiate a reindexing of the catalog.

如何確認的字詞組可以用於多面向導覽How to verify that the term set can be used for faceted navigation

目錄製索引之後,我們可以最後一開始執行一些設定。但是我們一開始的實際設定之前,我們只是確認我們可實際使用上製作網站的多層面導覽的字詞組。After the catalog is reindexed, we can finally start to do some configuration. But before we start with the actual configuration, let's just verify that we can actually use the term set on the authoring site for faceted navigation.

  1. 製作網站,移至網站設定->字詞庫管理On your authoring site , go to Site settings --> Term store management.

  2. 按一下 [標記字詞組,我們的案例中這是產品階層,然後按一下 [預期的用途] 索引標籤。Click to mark the term set, in our scenario this is Product Hierarchy, and then click the tab Intended Use.

  3. 確認已選取 [使用此顯示多層面導覽字詞組] 核取方塊。Verify that the check box Use this Term Set for Faceted Navigation is selected.

    已啟用多面向導覽

因為我們建立中的我們製作網站集合時,我們使用產品型錄範本階段 1: 建立跨網站發佈 SharePoint Server 中的網站集合,我們產品階層的字詞組預設會啟用多層面導覽。Because we used the Product Catalog template when we created our authoring site collection in Stage 1: Create site collections for cross-site publishing in SharePoint Server, our Product Hierarchy term set is enabled for faceted navigation by default.

If you used a different template when you created your authoring site collection, you must first enable the term set for faceted navigation. For information about how to do this, see [Enable a term set for faceted navigation](configure-refiners-and-faceted-navigation.md#BKMK_EnableATermSetForFacetedNavigation).

Now that we have verified that our term set can be used for faceted navigation, let's continue with the configuration.

From [Stage 12: Plan to use refiners for faceted navigation in SharePoint Server - Part I](stage-12-plan-to-use-refiners-for-faceted-navigation-inpart-i.md), remember that we want to add some refiners to all categories, and other refiners to only a subset of categories. Let's start by adding the refiners that we want to use for all categories:  *Brand*  ,  *Color*  and  *Price*  . 

如何將精簡器新增到字詞組中的所有字詞How to add refiners to all terms in a term set

  1. 按一下您的字詞組名稱。在 Contoso 案例中,這是電子。再按一下 [多層面導覽] 索引標籤和自訂精簡器。這會開啟一個對話方塊。Click your term set name. In our Contoso scenario, this is Electronics. Then click the FACETED NAVIGATION tab and Customize refiners. This opens a dialog box.

    自訂精簡器

  2. 在對話方塊的 [可用的精簡器] 區段中,向下捲動並選取RefinableString01。這是我們想要用於Brand精簡器的 managed 的屬性。請注意範例值顯示 (我們是依向右路徑良好符號)、 與別名我們授與此屬性時我們將其對應至編目屬性。In the Available refiners section of the dialog box, scroll down and select RefinableString01. This is the managed property we want to use for the Brand refiner. Notice that sample values are shown (a good sign that we're on the right path), together with the alias we gave this property when we mapped it to a crawled property.

    RefinableString01

  3. 若要將此精簡器新增至字詞組中,按一下 [新增]。To add this refiner to the term set, click Add.

    新增 RefinableString01

這停留RefinableString01屬性至選取的精簡器] 區段。當移至 [選定精簡器] 區段中的精簡器時,會顯示其他設定選項。(我們將會討論這些步驟 7 和 8)。This moves the RefinableString01 property over to the Selected refiners section. When a refiner is moved to the Selected refiners section, additional configuration options are shown. (We'll discuss them in step 7 and 8.)

 ![RefinableString01 Selected](../media/OTCSP_RefinableString01Selected.png)
  1. 重複步驟 1 至 3 新增RefinableString02色彩精簡器) 和RefinableInt01價格精簡器)。Repeat steps 1 - 3 to add RefinableString02 (the Color refiner) and RefinableInt01 (the Price refiner).

    所有選取的頂端精簡器

  2. 若要預覽適用的精簡器,請按一下 [預覽精簡器To preview our refiners, click Preview Refiners.

    預覽頂端精簡器

所以這啟動許多優外觀。然而我們想要有價格精簡器顯示第一筆、 且我們也想要變更價格值的間隔。色彩精簡器的我們想要讓訪客可選取多個精簡器值。So this is starting to look fairly good. However we want to have the Price refiner displayed first, and we would also like to change the intervals for the price values. For the Color refiner, we want to allow visitors to select multiple refiner values.

  1. 若要向上移價格精簡器,請選取RefinableInt01 (通知的別名、),然後按一下 [上移RefinableInt01清單中移到選取的精簡器] 區段中的第一個屬性為止。To move the Price refiner up, select RefinableInt01 (notice the Alias name), and then click Move up. Move RefinableInt01 up in the list until it is the first property in the Selected refiners section.

    上移

  2. 若要變更價格間隔的價格精簡器,選取 [ RefinableInt01。在 [顯示範本] 功能表中,選取含有長條圖的滑動軸間隔] 中,選取 [自訂] 並輸入我們想要顯示價格間隔。請使用分號分隔每個值。To change the price interval for the Price refiner, select RefinableInt01. From the Display template menu, select Slider with bar graph. For Intervals, select Custom, and enter the price intervals we want to display. Separate each value with a semi-colon.

    價格設定

  3. 若要讓訪客可選取一個以上的精簡器值的色彩精簡器,請選取 [ RefinableString02。從 [顯示範本] 功能表選取 [多重值精簡搜尋項目To enable visitors to select more than one refiner value for the Color refiner, select RefinableString02. From the Display template menu, select Multi-value Refinement Item.

    RefinableString01 多值

  4. 再按一下 [預覽精簡器。注意到我們價格精簡器現在會顯示我們自訂間隔] 中,並顯示具有好要找的滑動軸列。也我們色彩精簡器現在已可讓您選取多個精簡器值的核取方塊。Click Preview refiners again. Notice that our Price refiner now shows our custom intervals, and is displayed with nice looking slider bars. Also our Color refiner now has check boxes that enable you to select multiple refiner values.

    已設定預覽精簡器

  5. 若要儲存所做的變更,按一下 [確定] 對話方塊] 方塊中儲存在字詞庫管理工具。To save the changes, click OK in the dialog box and Save in the Term Store Management Tool.

    確定對話方塊

    儲存對話方塊

現在我們已新增應套用至所有類別的精簡器下, 一個工作就是新增應該只會套用至類別的子集的精簡器。Now that we have added the refiners that should be applied to all categories, the next task is to add the refiners that should be applied only to a subset of categories.

如何將精簡器新增到字詞組中的特定字詞How to add refiners to specific terms in a term set

階段 13: 規劃使用 SharePoint Server-第 ii 部分中的多層面導覽的精簡器,請記得我們想要將縮放螢幕大小的精簡器新增至 [照相機] 類別。我們也要將精簡器巨型像素為單位數位相機] 類別中,和最大 ISO新增至數位 SLR 照相機類別。From Stage 13: Plan to use refiners for faceted navigation in SharePoint Server - Part II, remember that we want to add the refiners Zoom and Screen size to the Cameras category. We also want to add the refiners Mega pixels to the Digital cameras category, and Max ISO to the Digital SLR cameras category.

將精簡器新增到字詞組的特定字詞、 時程序是相同的所有字詞。因此,以節省空間,我們將只顯示如何將縮放螢幕大小的精簡器新增至照相機字詞。When adding refiners to a specific term in a term set, the procedure is identical for all terms. So, to save space, we'll only show how to add the refiners Zoom and Screen size to the Cameras term.

  1. 按一下以選取您要將類別特定的精簡器新增至其中的字詞。在我們的案例中,這是照相機。按一下 [多層面導覽] 索引標籤、停止繼承] 及[確定]以確認。Click to select the term to which you want to add category specific refiners. In our scenario, this is Cameras. Click the FACETED NAVIGATION tab, Stop inheriting, and OK to verify.

    停止繼承相機

  2. 按一下 [自訂精簡器]。這會開啟一個對話方塊。Click Customize refiners. This opens a dialog box.

    相機自訂精簡器

  3. 若要新增並自訂特定字詞精簡器,重複上一個程序的步驟。To add and customize term-specific refiners, repeat the steps from the previous procedure.

    在我們的案例中,我們將新增RefinableString03RefinableString04屬性。若要確認已正確新增適用的精簡器,請按一下 [預覽精簡器In our scenario, we'll add the properties RefinableString03 and RefinableString04. To verify that our refiners are added correctly, click Preview refiners.

    相機特定精簡器

  4. 若要儲存所做的變更,重複步驟 10 從先前的程序。To save the changes, repeat step 10 from the previous procedure.

新增及設定我們在我們的規劃階段期間所識別的精簡器可能需要一些時間。好消息是我們已完成這,而不需要太多要取得精簡器新增到我們的網站上顯示的工作。Adding and configuring all the refiners we identified during our planning phase can take some time. The good news is that when we have finished this, it won't take much work to get the refiners to display on our website.

本系列中的下一篇文章Next article in this series

階段 15: 將多層面導覽的精簡器新增至 SharePoint Server 發佈網站Stage 15: Add refiners for faceted navigation to a publishing site in SharePoint Server

另請參閱See also

其他資源Other Resources

規劃精簡器和多面向導覽Plan refiners and faceted navigation