This project is read-only.

Using the OssSearchRefiners solution

  1. First and foremost, your desired refiner properties must be added as Managed Properties in your Search Service Application.
  2. Next enter your refiner panel xml in the Refinement.xml file. I would recommend that you test the refinement XML in a refinement panel web part in a Search Center. You can copy that xml and paste it into the Refinement.xml file.
  3. After editing your XML, build the solution and deploy it.

About the Project

Although this is a Low code solution, it may be fairly complicated. There is a lot going on that is not obvious when opening the project. There are 4 major components to this project: OSSSearchResultsRedirect.ascx user control, a custom osssearchresults.aspx page, the custom RefinementPanel web part, and the Refinement.xml file.
  • The OSSSearchREsultsRedirect.ascx user control is added in the AdditionalPageHead delegate control. This mapping is defined in the elements.xml file included with the feature. Once the feature is activated on a web application, this user control is loaded every time a page is loaded including pages in the _layouts directory. This control does nothing until it is loaded on a request for the OOTB osssearchresults.aspx page. When the user requests that page, the user control redirects them to the custom osssearchresults page included in the project.
  • The custom OSSSearchResults.aspx page is pretty simple. It's an exact replica of the OOTB osssearchresults.aspx. There is one key change: Looking in the page markup you can see that the I've replaced the OOTB RefinementWebPart with the CusRefinementWebPart.
  • The CusRefinementWebPart inherits from the OOTB RefinementWebPart. It simply reads the Refinement.xml file to determine it's refiners.
  • The Refinement.xml file is an embedded resource in the project. The CusRefinementWebPart reads this file's XML.

Last edited Oct 2, 2011 at 10:00 PM by lsconyer, version 6


No comments yet.