Monday 11 March 2013

Enable advanced search for custom columns SharePoint 2010

In this article we will show you how to configure new search metadata and add it to your advanced search properties, for example we have a custom site column with name “ReferenceNo” that we used in many content types and we need to add it in our search properties that the user can use it to filter search results so what we will do is create a SharePoint search “managed property” that refer to this site Column.

1- From the central administration application management page click on manage service applications
Adding custom search metadata in your advanced search SharePoint 2010
2- Click on Search Service Application or select it then click manage from the ribbon bar
Adding custom search metadata in your advanced search SharePoint 2010
3- In the left hand bar click Metadata Properties.
Adding custom search metadata in your advanced search SharePoint 2010
4- Then click new managed property.
Adding custom search metadata in your advanced search SharePoint 2010
5- Enter the property name and the description. In the use in scope section check the Allow this property to be used in scopes option.

6- On the same page click Add Mapping. The following screen will appear.
Look for Reference NO, select it, and then click ok.
Adding custom search metadata in your advanced search SharePoint 2010
Note: you must fill this site column with any value and did a full crawling search that we can find our custom column here if we didn’t make these steps you can’t able to find your custom column here.
You will be back the previous page. Click ok then.
Adding custom search metadata in your advanced search SharePoint 2010
7- Go to your advanced search web part then click edit page.
8- Select “Edit Web part” from the Edit menu on the advanced search web part.
Adding custom search metadata in your advanced search SharePoint 2010
9- Expand the Properties section and then click on the XML in the Properties box. You should be able to expand the view of the XML by clicking on the ellipse button.
Adding custom search metadata in your advanced search SharePoint 2010
10- Add the tag of your property in the property definitions section modify the DataType attrbuite with your property data type “your site column data type” and add another element in the result types section “this will appear in the advanced search properties dropdown list” of the XML as it’s shown below. Then when you finish click ok.
Adding custom search metadata in your advanced search SharePoint 2010
Note: add your property element in as the first element inside result types section in your XML.
11- Now go to the search page. You will find the Reference NO is added to the properties as below.
Adding custom search metadata in your advanced search SharePoint 2010
Note: you must start full crawling again after these two properties added that you can test after crawling is finished the advanced search with these two properties .

No comments:

Post a Comment