Wednesday, June 29, 2011

SharePoint 2010 Search: Filter by Enterprise Keywords/Managed Metadata

I was looking at ways to filter SharePoint Search by the Enterprise Keywords that users are entering. On the search results page, you have the refinements right there on the left hand side, and if you inspect the url you see:

/Search/Pages/Results.aspx?k=test&r=owstaxIdMetadataAllTagsInfo%3D%2306a328dfa-d7c8-4ae1-bc35-e33936dc6807%3A"MyTag"

That's mildly helpful, but I can't tell users that they have to look up a GUID if they want a link that filters by a tag.

So what I wound up doing is creating a new Metadata Property in the Search Service Application, and then mapping it to the Crawled Property: ows_TaxKeyword

Now, when users want to do a search filter by a tag, they can just enter the following:

/Search/Pages/Results.aspx?k=MyNewMetadataProperty:'MyTag'

No comments: