Adding Custom Properties to SharePoint Advanced Search
Requirement: We had a metadata column called “Service” in many document libraries & lists. End-users wanted to perform Searches based on the metadata column.
Solution: We can add custom properties to SharePoint’s Advanced Search page by following these steps:
A. Add Metadata Property Mapping
B. Customize Advanced Search
C. Trigger Full Crawl
Add a custom property in SharePoint advanced search- Step by Step:
A) Add Metadata Property Mapping
1. Go to Central Administration >> Shared Service Provider >> Search Administration >> Metadata Properties
2. Click on “New Managed Property” under Metadata Property Mappings.
3. Name the Property, say “service”, Enter the optional description, Choose the Data type of the property, select “Include Values from a single Crawled Property based on the order” and then click on “Add Mapping” button.
4. In the Crawled Property Selection window, Select the Category as “SharePoint” , enter the column name, Pick it from the list and click on “Ok”
5. Click on “OK” button to finalize the Metadata mapping.
B) Edit Advanced Search Page:
Edit the Advanced Search Page, usually it will be located at: /SearchCenter/Pages/advanced.aspx
2. Click on Modify Shared web part of “Advanced Search Box” Web Part.
3. Expand the Properties Node and then click on the Square button as in this picture.
4. That will open window with default XML. Copy-Paste the XML to SharePoint designer for easy editing, Add the entries to <PropertyDefs> and in <ResultTypes><ResultType> nodes
<PropertyDef Name="Service" DataType="text" DisplayName="Service"/> <PropertyRef Name="Service" />
5. See the new column added to properties drop down in Advanced Search page! so we successfully brought custom properties to SharePoint advanced search!!
C) Trigger Full Crawl:
After completing the above steps trigger the Full Crawl in Search Administration.
Otherwise, You will receive an Error message when you try to search:
“Property doesn’t exist or is used in a manner inconsistent with schema settings.”
Update: Add Custom Properties to SharePoint 2010, 2013 and 2016 Advanced Search:
Although this article written for MOSS 2007, There is nothing changed in later versions of SharePoint. The only thing is: Search is moved to Service application from SSP.
So, in SharePoint 2010, you launch search administration by going to: Central Administration >> Application management >> Manage service applications >> select Search Service Application >> and then click Manage from the ribbon
One thought on “Adding Custom Properties to SharePoint Advanced Search”
I am not getting the search results even for default property restrictions like name, author with a clause ** equals** or ** not equal** .pls help