<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.dotnetmafia.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Corey Roth [MVP] : SharePoint, Enterprise Search, SharePoint 2010, ECM</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/Enterprise+Search/SharePoint+2010/ECM/default.aspx</link><description>Tags: SharePoint, Enterprise Search, SharePoint 2010, ECM</description><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 20917.1142)</generator><item><title>How to: search the contents of a document set</title><link>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/11/09/how-to-search-the-contents-of-a-document-set.aspx</link><pubDate>Wed, 09 Nov 2011 22:03:44 GMT</pubDate><guid isPermaLink="false">ceb7fe2a-c56b-4d85-99e6-8dd548580538:5291</guid><dc:creator>CoreyRoth</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.dotnetmafia.com/blogs/dotnettipoftheday/rsscomments.aspx?PostID=5291</wfw:commentRss><comments>http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2011/11/09/how-to-search-the-contents-of-a-document-set.aspx#comments</comments><description>&lt;p&gt;I saw this question in the forums the other day, so I decided to see if it is possible to use SharePoint search to query just the contents of a document set.&amp;#160; It turns out that you can and it is quite easy.&amp;#160; Consider the following document set.&amp;#160; It has a number of contracts in it.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/image_05699D61.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/image_thumb_5CEABB4C.png" width="696" height="358" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I want to be able to search the content of the document set.&amp;#160; Document Sets are really just fancy folders.&amp;#160; You can tell this by examining the URL when you are viewing one.&amp;#160; Since it is just a folder, I realized that we can make use of the &lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/07/20/some-handy-keywords-you-might-find-useful-in-sharepoint-enterprise-search.aspx"&gt;Site keyword&lt;/a&gt; that I have talked about before.&amp;#160; Simply provide the URL and you will return all of the results of the document set.&amp;#160; Here is an example.&amp;#160; I can return the entire contents of the document set like in this example.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;site:&amp;quot;&lt;/em&gt;&lt;em&gt;http://sp2010/RM&lt;/em&gt;&lt;em&gt; Test/Work Package 1/&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;In the above example, my server is &lt;em&gt;sp2010&lt;/em&gt;, the document library is &lt;em&gt;RM Test&lt;/em&gt; and the document set is named &lt;em&gt;Work Package 1&lt;/em&gt;.&amp;#160; Here are the search results.&amp;#160; Note, that it returns the documents in the document set as well as the welcome page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/DocumentSetSearchResultsFull_40F98654.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="DocumentSetSearchResultsFull" border="0" alt="DocumentSetSearchResultsFull" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/DocumentSetSearchResultsFull_thumb_03F554C2.png" width="654" height="413" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Of course we can combine this with other terms.&amp;#160; For example if I want to search for documents in this set that involve the state of &lt;em&gt;Texas&lt;/em&gt;, I would issue the following query.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;site:&amp;quot;&lt;/em&gt;&lt;em&gt;http://sp2010/RM&lt;/em&gt;&lt;em&gt; Test/Work Package 1/&amp;quot; Texas&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/DocumentSetSearchResultsTexas_1DE914E4.png"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="DocumentSetSearchResultsTexas" border="0" alt="DocumentSetSearchResultsTexas" src="http://www.dotnetmafia.com/blogs/dotnettipoftheday/DocumentSetSearchResultsTexas_thumb_15F17282.png" width="658" height="277" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;As you can see querying the document set is easy.&amp;#160; Now your users might not be able to create a query like that very easily, but as a developer it gives you something to work with.&amp;#160; To search within large document sets, you could add a custom &lt;em&gt;SearchBoxEx&lt;/em&gt; web part to the welcome page.&amp;#160; The reason you would have to customize it is because you need the &lt;em&gt;site &lt;/em&gt;keyword to pass in the URL of the document set.&amp;#160; This could be done by inheriting from SearchBoxEx and by adding some simple code to get the current URL.&amp;#160; I’ll look at building this web part in the future when I have more time.&amp;#160; In the meantime, if you build one, drop me a line and tell me about it.&lt;/p&gt;&lt;img src="http://www.dotnetmafia.com/aggbug.aspx?PostID=5291" width="1" height="1"&gt;</description><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/Enterprise+Search/default.aspx">Enterprise Search</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/tags/ECM/default.aspx">ECM</category></item></channel></rss>