Wednesday, August 22, 2018

SharePoint Online: Content search web part is not displaying all refinable values

Have you ever be in this situation where you do not see all refinable values under mapped refinable property in CSWP?
You are not alone. :)

Here's what happened;
Business requirement:
- Want to display particular department items

Solution:
- Use CSWP and configure the refiners section.

Implementation:
- I have a created a custom column to hold department values
- Mapped this custom column to a refinablestring for using it on Content search web part (CSWP)
- I created a page with CSWP and configured it. I could not see all the values under that refinablestring.

You can follow this step to check on the refinablestring values.
- Create a page with Search web parts (Search box, search results, refinement)
- Configure the refinement web part and add the same refinablestring. You will be able to see all values.
This way you can confirm that the refinablestring has all values.

Below table represents my issue.
CSWPSearch Refinement WP


Why CSWP is behaving differently?
Those refiner values are being displayed based on the Search results preview items. Thus we see limited values.


What did I do to view required department value?
Please remember, this does not display all the values in CSWP refiner section.

- On Basics tab, change the path that has items with required column value.
Eg: I want to add "Legal" under Refiners tab in CSWP. I know there is a site(https://<sitecoll>/Legalsubsite) with an item with "Legal" value.
- Goto Refiners tab and look for the required value under refinablestring. (Notice that the search result preview will be refreshed)
- Then add that value
- Go back to Basics tab and change the path to original i.e., https://<sitecoll>
- Click Ok.

Basically, we are narrowing down the search results on preview to see our refinable values.

That's it !!!!!
Hope you find this content useful.