Change settings for the Refinement Web Part

The Refinement Web Part filters search results into categories called refiners. Users can click these refiners to narrow search results to find what they're looking for more easily.

By default, the Refinement Web Part is used on all default search vertical pages, which are the search results pages for Everything, People, Conversations, and Videos.

As a SharePoint Online administrator, you can change how the Refinement Web Part is set up. You can:

  • Filter search results from a different Search Results Web Part.

  • Specify which refiners to show.

    Note:  Any managed properties that you want to use as refiners must be set to refinable and queryable in the search schema. Also, the content source that contains the managed properties must have been crawled before the properties can be used as refiners.

  • Change the display template for a refiner.

  • Change display names for refiners.

  • Add counts to refiners.

What do you want to do?

Change how the Refinement Web Part behaves and looks

Change the display name for a refiner

Add refiner counts

Change how the Refinement Web Part behaves and looks

  1. On the page that contains the Refinement Web Part, on the Settings menu, click Edit Page.

  2. In the Web Part, click the Refinement Web Part Menu arrow, and then click Edit Web Part.

  3. In the Web Part tool pane, in the Refinement Target section, select the Web Part that you want to filter search results from. By default, the Search Results Web Part is selected.

  4. In the Web Part tool pane, verify that the Choose Refiners in this Web Part is selected.

  5. Click Choose Refiners.

  6. On the Refinement configuration page, from the Available refiners section, use the buttons to choose which refiners to show in the Web Part, and also in what order to show them. If you have specified an Alias for a refinable managed property, this alias is shown in the Configuration for section.

  7. In the Configuration for section, choose how you want each refiner to look.

    Note:  If you've a single language site, you can change the refiner display name in the Display name section. For multilingual sites, change the refiner display language as described under Change the display name for a refiner.

  8. Click OK.

Top of Page

Change the display name for a refiner

By default, the name of the managed property will be used as a display name for the refiner. In many cases, the managed property name is hard to understand — for example, RefinableString00 or ColorOWSTEXT. You can fix this by changing the name of the refiner in a JavaScript file.

  1. On the page that contains the Refinement Web Part, on the Settings menu, click Site Settings.

  2. On the Site Settings page, in the Web Designer Galleries section, click Master pages and page layouts.

  3. On the Master Page Gallery page, click Display Templates.

  4. On the Display Templates page, click Language Files.

  5. On the Language Files page, click the folder for the relevant language.

  6. Open the CustomStrings.js file.

  7. Add one line for each managed property that you want to change the display name for. Use this syntax:

"rf_RefinementTitle_ManagedPropertyName": "Sample Refinement Title for ManagedPropertyName"

For example, add this line to change the display name for the managed property RefinableInt00 to Price:

"rf_RefinementTitle_RefinableInt00": "Price".
  1. Save the file.

Top of Page

Add refiner counts

By default, the Refinement Web Part doesn't show refiner counts — that is, the number of results for each refiner value. For example, if you've enabled the managed property Color as a refiner, the refiner values will be colors, such as Red, Green, and Blue. You can add refiner counts by changing a value in an HTML file so that the refiner values are shown as Red (10), Green (12), and Blue (8).

  1. On the page that contains the Refinement Web Part, on the Settings menu, click Site Settings.

  2. On the Site Settings page, in the Web Designer Galleries section, click Master pages and page layouts.

  3. On the Master Page Gallery page, click Display Templates.

  4. On the Display Templates page, click Filters.

  5. Open the Filter_Default.html file.

  6. Change the value for ShowCounts to true.

  7. Save the file.

Top of Page

See also:

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×