Customizing SharePoint advanced search options
by Yaroslav Pentsarskyy
SharePoint Advanced search does not only have advanced search features for users, it also has set of extendable properties that developers and sharepoint administrators can use to make their user’s search experience more applicable to the organization. Let’s assume you have an intranet where each client has their own subsite and each sub-site has several document libraries. In some of those document libraries we have documents that represent Project Proposals. Our goal is to enable our users to be able to go to advanced search and return all of the documents that are Project Proposals. How do we go about doing that?
First our document libraries have to have metadata fields defined that will specify whether the item (file) is a proposal. This can be achieved as easily as creating a Yes/No type of field in your library and populating files based on whether they are proposals.
Next, you need to map your newly created document library properties to the properties that will be available in search. To do that access Metadata Property Mappings located in your SharePoint Shared Services. If you have few Shared Services sites - access the one where you have chosen your search service to run under. Most of the time url of the screen we’re refering to is “http://searchservicesserver:port/ssp/admin/_layouts/schema.aspx”. Click on New Managed Property as displayed below:

Select the name and the type of the property as shown below:

Now we need to map our Mapped Property to the Crawled Property which sharepoint crawles based on your schedule. Click Add Mapping button and find the property name you have created in your document library.
Note: If you have just added the name it will not appear in this list untill next incremental crawl. You can force an incremental crawl from Shared Services Administration.
Once the property is added, remember it’s name and head off to your SharePoint portal.
In here navigate to advanced search page and click Site Setting->Edit Page . Select to modify properties of Advanced Search Box webpart. From the list of available properties select as shown below:

In here, the most important is the XML within “Properties” field (second highlighted). Click on the elipsis (…) and copy it to something like notepad for more flexibility.
Find the following line:
<ResultType DisplayName=”All Results” Name=”default”>
and copy the entire content untill the following line:
</ResultType>
Paste the content right below and rename DisplayName from “All results” to something like “proposals”. Same applies to Name property.
Replace the <Query/> with the following <Query>[Proposal Managed Property Name]=1</Query>.
Which depending on what you have called your managed property for proposal will have it’s appropriate value equal to 1 - in this case True.
Now all we need to do is paste our newly changed XML to the Properties value of Advanced Search webpart properties dialog and click OK.
After you refiresh your Advanced Search page - you will have your new functionality to search for proposals ready and working.
Drop me a note in case you have any questions
Yaroslav Pentsarskyy
Blog: www.sharemuch.com