4

I have a custom BCS model that I am using to index SQL data in SharePoint 2013. The localized name of the type of item is being set as the title (i.e. Answer, Question, Idea, etc.). In the search results, this results in the link being displayed as that title and then the content/link under that.

For my BCS entities in the search results, I would like to add refiners that use the titles found. For instance, if some Questions and Answers are returned, I would like the Result Type refiner to show "Question" and "Answer" in the options to refine the search.

If possible, I would like to do this without manually editing the refinement web part instance on the page. This is part of a packaged solution that should "just work" when someone deploys it rather than requiring that manual web part editing.

1 Answer 1

1

After much experimentation, I found that the refinement panel is controlled by Filters in the Display Templates folder: /_catalogs/masterpage/Display Templates/Filters.

By editing the Filter_Default.html Refinement Item filter, I was able to add refinement options based on properties of the BCS items.

To package this, I had to create a new Filter file that gets deployed by my custom solution. Then, in the web part for the search refiner, set the refiner to use the filter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.