“Advanced Search” is a great feature, although not utilized in many cases. Out-of-the-box, it provides a default set of available options, which are too general for most businesses. However, it can be enhanced with some easy customizations.
In this post, I’m going to demonstrate one of the most powerful configurations of “Advanced Search” in SharePoint 2013/2016 and Office 365: how to add our custom property filters.
The steps to follow:
0) Make sure the property you want to work with does exist as a Managed Property.
1) Open the “Advanced Search” page (usually the URL is http://[your-search-center-url]/Pages/advanced.aspx
2) Click on “Edit” page.
3) Once in edit mode, open the “Advanced Search” box web part’s properties.
4) In the web part properties, open the “Properties” tab, and you’ll see an XML there in this crazy, impossible-to-edit format:
5) Open this XML by clicking on “…” next to it. Select all and copy to a good editor, like NotePad++, and format as XML. You get something like this:
6) The sections of this XML are:
- Languages: feel free to remove the languages which are not relevant to your search.
(Note: However, don’t touch the LangDefs in the beginning!)
- PropertyDefs: You can define what properties you want to use on “Advanced Search.” For example, let’s add a property named TrainingID:
- ResultTypes: To add TrainingID to each result type where it’s relevant, add a new PropertyRef entry as shown below:
7) When you’ve added it to each result type you wanted, linearize the XML, select all and copy the whole XML to the clipboard, and then back to the editor in the web part properties.
8) Click OK in the editor. Click OK on the web part’s properties, then save the page.
Your custom property (Training ID) is available in the property filter drop down now.