It is kind of painful, and probably unsupported but here is what you need to do to make the UniqueId a crawled property / mapped property such that it can be included in the advanced search results...
First, you need to internally change the UniqueId field on the list(s) you wish to search such that it is no longer hidden and can be indexed by the crawler. Here is some sample object model code:
// this is the identifier for UniqueId
Guid g = new Guid("4b7403de8d9443e89f0f137a3e298126");
// we will need these for reflection in a bit
BindingFlags bf = BindingFlags.NonPublic | BindingFlags.Instance;
using (SPSite s = new SPSite("http://SharePoint/")) {
// grab the list that contains what you want indexed
// and the UniqueId field from that list
SPList l = s.RootWeb.Lists["Your Custom List/Library"];
SPField f = l.Fields[g];
// We need to call the private method SetFieldBoolValue
// to allow us to change the Hidden property to false
MethodInfo mi = f.GetType().GetMethod("SetFieldBoolValue", bf);
mi.Invoke(f, new object[] { "CanToggleHidden", true });
f.Hidden = false;
f.Update();
}
Once that code has been run (and on all the lists/libraries you want covered), you need to perform a three steps in the Shared Services Search Administration:
- Perform a full crawl.
- After the full crawl finishes, navigate to the Crawled Property Categories (typically /ssp/admin/_layouts/schema.aspx?ConsoleView=crawledPropertiesView on your server) and verify that a property called ows_UniqueId exists. You then need to create a Managed Property called UniqueId that maps to ows_UniqueId.
- Perform another full crawl.
Once the second full crawl has completed, you should have data populated in the index containing the UniqueId. You can expose it in the advanced search by modifying the Search Core Results:
- Open the web part for editing
- Expand the "Results Query Options"
- Modify the XML for the Selected Columns to include a reference for UniqueId
- Modify the XSL for the Data View Properties to include a statement to output the UniqueId
- Click OK, and publish the page if necessary