Back to previous

Customise Advanced Search box in Sharepoint

Recently I had the chance to customise the advanced search box of Sharepoint server portal, with own fields/ properties and defined a seperate scope for it. It was not hard, but needs some research and practical experiments. Sharepoint comes with an advanced search web part, and that is customisable, particularly when we want to enable users to search based on custom property/ attributes.

Say we have a list, and we want to display an advanced search box above the all items table. All we have to do is, edit the page and insert an advanced search box above it.

In the Search box settings, we can enable many options such as "Show all words", "Show exact phrases", etc. It's all depend on your favor. The important part is the scope setting. There is an xml strings in "Properties" and this defines what properties can the user filter the search on. To define our own propeties of the list, as well as the scope, we need to go the central administration portal.

In central administation, go to SharedServices, Search Settings, Metadata property mappings. This is where we add in our own fields. Hit "New Managed Property", enter your field name, and in "Mappings to crawled properties", click "Add Mapping", search your own field. After that, hit ok and ok. Once all fields have been added, we need to go to "Content sources and crawl schedules and recrawl the site. This will take some minutes.

 

ShareThis

If you think this post is useful, please recommend me at the bottom of the page. ;)

Discussion