Search Driven Applications with Office 365 / SharePoint Online Using the tagging feature in SharePoint 2010

Common stuff about Search Driven Applications and a solution proposal with Office 365 / SharePoint Online.
You can build Search Driven Applications in several different ways and based on different techniques. One of the easiest is using the Query Object Model from the SharePoint Search to create “Fixed Keyword Queries”. For example this query shows all SharePoint sites which you have access to:

contentclass: STS_Site contentclass:STS_Web contentClass:sts_listitem_850

But the “magic” within Search Driven Solution is aggregating some similar crawled properties together in one managed property. See schema diagram:

Search Driven Applications

Example: you have two lists in your SharePoint farm which both contains information about customers. Because of some historical reasons, maybe migration from SharePoint 2007 or merging from other systems, these are both independent and different fields in different SharePoint List. Merging this two Crawled Property together in one Managed Property called for example “cKunde” allowed you querying both fields with one call (for example: cKunde:AOL – you will get results from both list). Pooling Crawled Properties in Managed Properties as shown in the next picture is one of the technical basics for Search Driven Application:


Pooling properties is no problem in a SharePoint on premise installation. But with Office 365 / SharePoint Online we ran in some problems. The main problem is that we cannot configure the Search Service Application in Office 365 / SharePoint Online. So we are not able to do the merge from Crawled to Managed Properties, and without Managed Properties we are not able to query the content for specific issues. We can of cause use the given default Managed Properties like “Author, Filetype, Name etc.” and build Search Driven Solutions based on them. The constrain here is that we cannot edit them free as we need. The Managed Property “Filetype” for example is filed by the system with the given value. So we have to use some “tricks” to build Search Driven Application with Office 365 / SharePoint Online.

My solution for this problem is using the tagging feature in SharePoint 2010. Within this feature we are able to tag any content with special and individual information that can later be used to aggregate it under this scope or in the mix with other tags / scopes. Using the feature: “Metadata Publishing -> Save metadata on this list as social tags” allowed us to force users to fill in metadata in keyword fields or set default values which will then be automatically published as a social tag.

Search Driven Applications

Based on this there are several ways to build Search Driven Solutions.
There is a Crawled Property called SocialTagId that can now be used to query for a special tag and so it can be used to build a search driven webpart.

Example search query: SocialTagId:”6a…b-754b-480e-86e8-5a…ae”

This Managed Property can also be used with standard search syntax for building AND / OR queries and be mixed with other search terms.

ESPC call for speakers 2024
Example: SocialTagId:”fb2d872a-8750-4913-bc23-b0b32252b489″ OR SocialTagId:”25dee478-f426-4dc1-9d25-340e9ecce093″ – shows any content which is tagged with one of the given tags behind this SocialTagID´s

Some points to attend:
• The result is just the same you get when you navigate to the Tag Profile page for a special tag.
• Benefit is that you can use the resultset coming from the search in a separate webpart und customize the style etc. in an easy way
• We are not able to do a fuzzy search within this
• You have to find out the SocialTagId which depends to your tag. This is not really a problem. To do these navigate to the Tag Profile, select “To find content related to ‘%tag%’ in search, please click here.” The result is a search with the Managed Property “SocialTagId” and the given ID for the selected tag:

Search Driven Applications

To Customize those Search Result using SharePoint Designer and XSLT follow the steps described by Laura Rogers:

Webcast with hands on system demos:

Summary: we can build search driven solutions based on the tagging feature in Office 365 / SharePoint Online. Within advanced Document Library and List features like “Metadata Publishing” we can increase the usability and the user experience for adding this kind of information.

To aggregate any content tagged with special tags we can use the Managed Property SocialTagId.

Nicki Borell ( ) is an evangelist & consultant in the Experts Inside team. He has worked for more than 9 years in Microsoft enterprise environments and also as a trainer and consultant for the SharePoint and SQL Server products. His expertise extendes from technical consulting all the way to project management, with his core competencies covering KMU, enterprise environments and government data management. Nicki is Microsoft Certified System Engineer (MCSE), Database Administrator (MCBA), IT Professional (MCITP) and Trainer (MCT).”

Check out our resource centre for more SharePoint content from our SharePoint specialists!

Gain instant access to our SharePoint content by following us on twitter or facebook.

Share this on...

Rate this Post: