What happens when your taxonomy just isn’t enough? Say for example you want to reach across all classifications, all sites and all content of your corporate intRAnet site and display the most recent documents that contain a specific word(s)? The Content Query Web Part (CQWP) is great for taxonomy based rollups, but you can’t specifically pull items containing a word. If you’ve ever worked on your SharePoint 2010 search results page(s), you are familiar with the Search Core Results web part. This web part displays the search result set to the end user, presumably who just performed a search.
Well, not always because the web part can also be used to do something pretty interesting. The Search Core Results web part can be used to display the results of a pre-defined search term. For example, let’s display the 5 most recent pages containing the term “conference”. This can be accomplished by simply setting the “Fixed Query” property to “conference -isDocument:0” and setting the Cross-Web Part query ID to anything but “User Query”. Under the “Results Display/Views” section of the web part properties dialog box, you can set the “Results Per Page” to 5 and also decide to display by Relevance or by Date using the “Default Results View” property.
By virtue of being the Search Core Results web part, it still has the same capabilities such as alerts and RSS. You can also still control how many lines of descriptive text per link to display. If you need to modify the look and feel of the results being displayed, you still just modify its XSLT. The resulting display will not only a list the 5 most recent documents of your site containing the term “conference”, but keep in mind it’s pulling from the search index. This means they are also the 5 most relevant documents which contain the term “conference”. Additionally, this is not a static list nor is it a simple rollup. This is now a piece of content that keeps itself updated based on a 400 million dollar relevancy algorithm, can be targeted to audiences and connected to other web parts on the page.
This post has discussed SharePoint 2010 OOTB functionally. Now consider the personalization possibilities of enhancing this functionality by replacing the pre-defined term “conference” with a variable pulling from the users profile, say the “I’m interested in” variable.