The end result can look like this:
First, you need to make your site name property refinable.
I made this change to the Search Schema in the Search Service Application (SSA) within Central Admin (CA).
- From CA, click on Manage Service Applications
- Click Search Service Application
- Click Search Schema from the left nav under the "Queries and Results" section
Here are two options:
Option 1 - Modify the existing managed property to make it refinable
- Search the managed properties for "siteTitle"

- Click Edit/Map Property for the "SiteTitle" property

- Scroll down to the "Refinable" section and choose the option for Yes - Active

- Click OK.
Option 2 - Map the crawled property to another managed property that is refinable
I chose this route, but I am not sure if there is an advantage to choosing one over the other- Click Crawled Properties
- Search for "sitename"
- Hover over the property "ows_SiteName and click on Edit/Map Properties.
- From the "Mappings to Managed Properties" section, click on Add a Mapping.

- From the popup window, you can search for an existing managed property. There are many empty refinable properties available for you to use (search "refinable"). In this case, I am choosing "refinableString08" because I do not have that mapped to anything else.
- Click OK in the popup window. I have to scroll down to see the button, so it can be easy to miss.
- You can verify that the mapping saved by searching for the property and you will see the new managed property mapping

NOTE: Changes to properties will take effect after the next full crawl.
Now that your property is refinable, you can add the refiner to your search results page(s)
- From your search results page, click the gear, then edit page
- Click the options arrow for your Refinement web part and click Edit Web Part.
- From the edit pane, click Choose Refiners
- Click on the managed property name for your refiner (SiteTitle if you made the default property refinable, or whatever managed property you used if you mapped the crawled property to an available refinable managed property)
- Click Add
- Enter text for the "Display Name". This is what will appear above this group of options in the refinement panel. It could be something like "Site", "Site name", or "On this site".
- Click OK.
- Click OK in the web part editing pane.
- Save the page, check it in and publish.
Run a test query and you should now be able to see the new refinement option in your results page.
If you want to add the search result counts to your refinement panel, see the instructions provided by Steve Mann


No comments:
Post a Comment