Adding Custom Refiners to OOB Search page

proicon_listsearch
Search

Who ever have used SharePoint OOB search might have observed a refinement panel on the left side where by default SP will list out possible list of FILTERS based on the content it has crawled. Like File Type refiner, User refiner, Time stamp refiner & so on….

What if you need a custom refiner in the left navigation which filters search results?

Below steps will explain the same.

Before jumping in, refiners are nothing but the column values of different records that are aggregated by SP & stored in the DB. These will be used like filters during searches. Like for OOB refiner “File Type”, the values will be DOCX, PPTX, XLSX..

And for the sake of maintaining standards, I am using Term store here.

  1. Create a term set & term (Policy  Types) with terms as HR, finance, IT..
  2. Create a new site column (PolicyType) mapping to the above term set
  3.  Let there be a new document library with new site column
  4. Fill up the library & add N number of rows

After some time SP might have automatically created a Crawled property for us based on the new site column. We can use it or just create a new managed property mapping. We shall do the later just because we can.

  1. Go to Central Admin — Service Applications — Search Service application CLICK
  2. Click Search Schema — Click New Managed Property
  3. Give below details in the screen & submit

 

Name: MYPolicyType
Type: Text
Searchable: Yes
Refinable: Yes – Active
Sortable: Yes – Active
Queryble: Yes
Retrievable: Yes
Allow Multiple: NO
Safe: Yes
Mapping: ows_policytype

  • Now start a FULL search crawl & wait till it finishes.
  • Go to the SearchResults_documents.aspx & keep it in EDIT mode
  • Go to the web part properties of the REFINERS web part
  • In properties window, click on CHOOSE REFINERS
  • Select “MYPolicyType” from left list box & move it to right
  • At the bottom, use below values
  • Display Name: Policy Type
  • Display term: Refinement Item
  • Click OK
  • Save & Publish the page.

I would like to thank below URL where OOB crawled propertie is used which is again a good IDEA if you are planning to have many search schema level items.

: https://blogs.msdn.microsoft.com/aatishblogs/2014/02/02/refiners-for-managed-metadata-columns-in-sharepoint-online/

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Powered by WordPress.com.

Up ↑

%d bloggers like this: