This is my first of many SharePoint 2013 blogs and I’m starting with Search.  I like the new Search UI for users and the look is so much cleaner with the hover panel, search blocks, etc..  I’m really curious how customizing the Search refinement panel works in SharePoint 2013.  I was surprised to see that Company was missing from the refinement panel on the left when I initiated a query and returned items.     

For Example:

Initial

 

In my test scenario, I added several different types of office documents where the properties of those documents had a specific Company populated.  I want to add Company to the refinement panel in 2013 Search so that I can drill down the search results based on Company.   For those that don’t know, the refinement panel is a way to drill down on the base search results by only returning results based on a specific property.

For Example:   I query weather and only want to retrieve results authored by Ron Burgundy so I click on Ron Burgundy from the refinement panel on the left.

 

Managed Property vs Crawled Properties and the Search Schema

In order to start, you must understand the concept of Managed Properties verse Crawl Properties. This basic concept hasn’t changed from SharePoint 2010.  As you crawl items, those (properties\property values) associated with that item are crawled as well and present in the Search Schema as crawled properties.   The crawled properties by themselves can’t be queried.   That’s where Managed Properties come in, you create managed properties and map those to crawled properties by accessing the Search Schema.  Subsequently, users can query the managed properties with a specific query and return results.  The Search Schema consists of Managed Properties/Crawled properties and defines what attributes are available for a given property.   The search schema controls what properties can be searched and controls how they are presented within Search enabled sites.  Modifying the Search Schema is a fancy way of saying I want to add new managed properties and map them to crawled properties in the Search Admin UI or Power Shell.  

 

 

Modify the Search Schema (Add Managed Property and Map to Crawled Property)

In order to start, we must modify the Search Schema in order to add a managed property.  It’s now possible to update the search schema within the context of a Site Collection but this blog will be focused on how to do this at the Search Service Application Level so that it will be pushed down to all Web Applications consuming from it.  So again, these steps will walk you through adding company to the refinement panel.  The first steps are to Create a Managed Property and Map it to the Company crawled property. 

Steps are the following:

1. Access Central Administrator and Under Application Management select Manage service applications                  

2. Select the Search Service Application, and hit the Manage button from the Ribbon

3. Next, Select Search Schema link on the left under Queries and Results section

searchscema1

 

4. Ensure you select the Managed Properties Link and in the Managed Property field, type orgnames and hit enter

image

 

 

5. Select the drop down next to OrgNames and choose Edit/Map Property

image

 

 

6. Scroll down and under Alias, replace Company with “NotUsedCompany” and scroll down and hit OK

image

 

 

7. Hitting OK should bring you back to the Search Schema Page and click on the New Managed Property link

 

8. For the Name I typed CustomCompany and dropped a description in and the is specified as Text

image

 

9.     At a minimum check the following options:  (Queryable, Refinable (yes))

10.   Optionally, I also checked Allow Multiple Values and Sortable

image

 

11. Scrolling down I now entered Company as the Alias and also left Token Normalization checked

image

 

 

12. Now, the most important part is add a mapping to a crawled property so in this case I click on “Add a Mapping”

addmappin1

13.  Within Crawled property selection choose All categories and type company and hit Find

image

 

 

14. Select Company and hit OK and it should now look like:

image

 

15.  Scroll down leaving the remaining options as default and click OK

 

16. This takes you back tot he Search Schema so enter customcompany in the Managed Property field and ensure it looks like this:

image

 

17.  Now perform a full crawl on your desired content source by clicking on the Content Sources link on the left

contentsource

 

 

18.  Now hit the pull down next to the desired content source and choose Full Crawl

19. After completion move to the next steps

 

 

Modify the Search Results page and update the the Refinement Web Part

After the full crawl has completed, The final step is to update the refinement web part on the Search Results page for a Search Site.  The steps are the following:

 

1. Access your Search Site and perform a simple search to get to the results.aspx page.

Note: Notice my results have the standard refinement options like Result Type, Author, and Modified Date

image

 

 

2. Next hit the gear on the top right of the page and select Edit Page

image

 

 

3. On the left, hit the pull down next to the Refinement web part and click “Edit Web Part”

image

 

 

4.  The Properties for the Refinement web part will be on the right so select the Choose Refiners… button:

refinewebpart1

 

 

5.  On the list of Available refiners on the left, choose the CustomCompany and click Add.   Under Configuration For: Custom Company window, update the Display Name to Company.  It should look like this:

image

Note:  On the right, I hit Move Up to place CustomCompany above Last Modified Time

 

 

6. Hit OK and that should take you back to the Search Results page where you can perform additional Edits.  Hit OK to the Refinement web Part properties dialog on the right

image

 

7. Check In your changes by hitting the Check In button from the Ribbon and finally Publish

 

8.  Now perform a search query and validate Company is now available in the refinement panel

image

 

 

Question: Why did you update the display name of the orgnames managed property?

Answer:  Each display name is unique so you can’t have the same alias name for two or more managed properties.

 

 

Question:  I followed your steps and I don’t see Company from the refinement panel after performing a search?

Answer: The most likely cause is that you need to index or reindex content that has values populated for Company property.  Finally, ensure your searching for terms contained in that document.

 

 

Thanks!

Russ Maxwell, MSFT