Basic Search – Metadata Property Mappings

As mentioned in the last post about Search,
in the following posts there will be some more advanced features. In this post there
will be some details about the your search properties (and using them in  your
URL). While in the next post there will be some info about the Search Result Hidden
Object, that allows you to sort your complete result set (and not only by the default
relevance option).

Depending on how you use your SharePoint environments
you can either choose for standard search WebParts (giving you only the options described
in the previous post) or create your own webparts (described in the next post). Whatever
option you may choose you will have to deal with showing information in you result
set. Something that is easily obtained through the use of Metadata property mappings.
This is a nice feature hidden in your SSP under search settings.  It
contains a list of properties on your environment,  and
the possibility to make a new one (making new ones allows you to map them to the BDC
or other values existing on your environments).

Each item has a nice checkbox “Use in scopes”
checking it will not only allow you to use this property to exclude/include items
based on the property value but also allows it to be used in your URL.

Small example:

Most of you knows that passing
the ?k=Test parameter
to your search page will get a result set containing the keyword test. Passing the
next url to your search page will not only get items containing the keyword test,
but also match the Author : ?k=test+Author:”SystemAccount”

Each managed metadata property you create
can be used within your URL to filter down search results (actually it’s how Faceted
Search works).

Knowing that unleashes a lot of potential
to your search solutions.

A small real live example:

You have a WebPart that gets items and folders.
By searching in that WebPart you get redirected too your search page with a custom
scope and you have the search results you want (easy doable with a k=<textbox value>&s=<set
property>.

Now we would like to search not only the scope
(that contains all items), but also we would like to search within a folder , the
trick here is finding the metadata property containing the url (or folder in our case).
Besides the fact that it took ages to find out what property it was, it’s pretty simple.
The property seems to be Basic:9, so we made a new Metadata property and mapped it
to Basic:9, that leaves us with a property containing the URL and all we had to do
was to expand our k=<textbox value> with a +MetadataProppertyContainingBasic:9:”<the
current folder>”. That actually returns only items of the folder where in.

Leave a Reply