Refine search results by Managed Metadata - Part 1 (Introduction)
The SharePoint search engine is powerful, high-performance and can aggregate data across site collections. The search results can be flexibly adjusted. Search-based applications in SharePoint provide many advantages.
To evaluate data across the company, data must be tagged with the same metadata. This is the only way to aggregate different data (libraries, lists, etc.) with justifiable effort. Tagging should be done via the central managed metadata term store.
This blog article shows how to filter through a metadata tree. The following screenshot shows the structure of the application and the terms. Only Refiner Display Template and Item Display Template are adapted for the application.
The application is based on HTML and JavaScript. As usual with JavaScript methods developed by Microsoft for SharePoint, there is a lack of meaningful documentation.
Elio Struyf has published excellent blog posts that document the JavaScript search methods by Microsoft. Please note that I assume that these articles including the code are known. I will only deal with my specific code changes to Elio's code.
In particular, his following blog articles are important for understanding the application:
- Search Refiner Control Methods Explained
- Create a Multi-Value Search Refiner Control
- Sharing my managed metadata refiner display template
The adaptation of display templates is easy compared to refiners. Here are some interesting articles on this topic:
- Understanding how item display templates and hit highlighting work in SharePoint Server 2013
- SP2013 Search Display Templates Semi-Deep Dive
- Create SharePoint 2013 Item Display Template overriding RenderBody
Thanks for reading and stay tuned for Part 2: Use Case.
Any questions or remarks? Please leave a comment.