<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sharepointsearch.com/cs/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>Sanjaya on SharePoint Search  : Search scopes faqs, Search scopes</title><link>http://sharepointsearch.com/cs/blogs/sanjaya/archive/tags/Search+scopes+faqs/Search+scopes/default.aspx</link><description>Tags: Search scopes faqs, Search scopes</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP2 (Build: 20611.960)</generator><item><title>Restrict search to return documents from a File Share only? </title><link>http://sharepointsearch.com/cs/blogs/sanjaya/archive/2009/06/10/how-to-search-documents-from-a-file-share-only.aspx</link><pubDate>Wed, 10 Jun 2009 21:09:00 GMT</pubDate><guid isPermaLink="false">4a9b4754-8bc4-467f-9abf-80464617d2f0:25740</guid><dc:creator>spaudel</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://sharepointsearch.com/cs/blogs/sanjaya/rsscomments.aspx?PostID=25740</wfw:commentRss><comments>http://sharepointsearch.com/cs/blogs/sanjaya/archive/2009/06/10/how-to-search-documents-from-a-file-share-only.aspx#comments</comments><description>&lt;p&gt;Sharepoint search scope is the way to go to realize the above requirement.In this article, we will go through all those configurations required to create a search scope that will be dedicated to return results from a file share only.&lt;/p&gt;
&lt;p&gt;Before we start with the steps to create our scope for file share, let&amp;#39;s take a look at different types of search scopes, scope rules and scope behavior. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Scope Types&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;SharePoint has two types of search scopes.&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;Contextual scopes &lt;/b&gt;are created automatically based on the context of the site area user is currently working on such as a web or a list etc. These scopes let user search content from those specific areas only. In a SharePoint site, these scopes read like &amp;quot;this site&amp;quot;, &amp;quot;this list&amp;quot; etc.&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;Custom Scopes &lt;/b&gt;are the ones that an administrator can create to target a specific type of content. Two types of custom scopes can be created:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;SSP Level Scopes&lt;/b&gt; are global and shared across all the site collections that are associated with the SSP. The SSP level scopes are managed at the SSP level by a farm administrator.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Site collection level scopes &lt;/b&gt;are local to a site collection and are managed by the site collection administrator.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;b&gt;Scope Rules&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The &lt;b&gt;custom scopes &lt;/b&gt;can be created based on the following types of &lt;b&gt;scope rules&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Web Address&lt;/i&gt;&lt;/b&gt;&lt;i&gt; -With web address you can limit the results to a certain web address only. Such as a document library or a list in sharepoint, a sharepoint subsite, a sharepoint site collection or a folder in a sharepoint document library etc.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Property Query&lt;/i&gt;&lt;/b&gt;&lt;i&gt; applies restriction as a comparison of property to a value. Such as you can restrict results to &amp;nbsp;the documents where the property Author=Mark or exclude the documents where Author=Martin or require that all the documents in the results must be authored by John. How the scope rule should apply to a scope is defined by scope behavior and will be dealt in the section &lt;b&gt;Scope behavior&lt;/b&gt;.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;A &lt;b&gt;content source&lt;/b&gt; that has already been created can be used to create a scope that includes all the items indexed by the content source.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;By choosing &lt;b&gt;All Content &lt;/b&gt;type scope, the scope will include all the items indexed by all the available content sources.&lt;/i&gt; &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Scope Behavior&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;How a &lt;b&gt;scope rule&lt;/b&gt; should be applied to the overall scope is defined by &lt;b&gt;scope behavior. &lt;/b&gt;One of three behaviors can be applied to a scope rule.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Includ&lt;/i&gt;&lt;/b&gt;&lt;i&gt;e - Any item that matches this rule will be included, unless the item is excluded by another rule. Select this option if you want the rule to be applied (if another rule precludes its inclusion, it won&amp;#39;t be included). The include option is analogous to the logical operator AND.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Require&lt;/i&gt;&lt;/b&gt;&lt;i&gt; - Every item in the scope must match this rule. Select this option if you want the rule to be applied regardless of other rules. The require option is analogous to the logical operator OR.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Exclude&lt;/i&gt;&lt;/b&gt;&lt;i&gt;-&lt;/i&gt;&lt;i&gt;Items matching this rule will be excluded from the scope. Select this option if you want items that match this rule to be excluded from the search scope.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Create a scope to return documents from a File Share? &lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We looked at what search scopes are and how are they applied to SharePoint content index, here we create a scope to search documents from a file share.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Step1: Create a content source to crawl your FileShare&lt;/u&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Browse &lt;/b&gt;to the central administration site and &lt;b&gt;Click &lt;/b&gt;the SSP for the site collection.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Click &lt;/b&gt;on search settings and then Content sources and crawl schedules.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Click &lt;/b&gt;on New Content Source link.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Enter &lt;/b&gt;a content source name and address url to the FileShare such as &lt;a&gt;file://devserver/sampledocuments&lt;/a&gt; or &lt;a&gt;file://devserver/sampledocuments&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Click &lt;/b&gt;ok.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;u&gt;Step2: Create a scope based on the content source&lt;/u&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Browse &lt;/b&gt;to the central administration site and &lt;b&gt;Click &lt;/b&gt;the SSP for the site collection.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Click &lt;/b&gt;on search settings and then &lt;b&gt;Click &lt;/b&gt;on view Scopes.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Click &lt;/b&gt;on new scope link. &lt;/li&gt;
&lt;li&gt;&lt;b&gt;Enter &lt;/b&gt;title as &amp;quot;FileShare&amp;quot; and leave other details blank and &lt;b&gt;Click &lt;/b&gt;OK.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Click &lt;/b&gt;on Add Rules option for the scope &amp;quot;FileShare&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Select &lt;/b&gt;the content source created for the FileShare in step #1 and &lt;b&gt;Click &lt;/b&gt;OK.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;u&gt;Step3: Add the scope to a scope display group&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;A scope display group is used to organize a list of scopes. The scope display group is then assigned to a search box to be able to search on those scopes. Lets add our scope &amp;quot;FileShare&amp;quot; to a scope display group.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Browse &lt;/b&gt;to the site collection for your search center (This is the site collection which has your search page).&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Select &lt;/b&gt;Site actions&amp;gt;Site settings&amp;gt;Search scopes. You will notice that the scope &amp;quot;FileShare&amp;quot; has no scope display group assigned at this time. We can either create a new display group and add or add it to an existing group.&lt;/li&gt;&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Click &lt;/strong&gt;on the scope display group &amp;quot;Search Dropdown&amp;quot; and &lt;strong&gt;Select &lt;/strong&gt;the scope &amp;quot;FileShare&amp;quot;.&lt;b&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;u&gt;Step4: Using the scope display group for a search box web part&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;The scope display group &amp;quot;Search Dropdown&amp;quot; has our scope included in it. In this step, we will ensure that our search box webpart uses this scope display group.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Browse &lt;/b&gt;to the search page and &lt;b&gt;select &lt;/b&gt;site actions&amp;gt;edit page.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Select &lt;/b&gt;edit&amp;gt;modify shared webpart on the search box web part.&lt;/li&gt;
&lt;li&gt;On the properties pane, &lt;b&gt;expand&amp;nbsp;&lt;/b&gt;the section miscellaneous and check the property value for the property scope display group and make sure that it is &amp;quot;Search Dropdown&amp;quot; as selected at #Step2.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&lt;u&gt;Step5: Updating the scope &lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Unless the scope is updated, it will not appear on the scopes dropdown of the search box webpart. To update the scope, follow the steps below.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Browse &lt;/b&gt;to the central administration site and &lt;b&gt;Click &lt;/b&gt;the SSP for the site collection.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Click &lt;/b&gt;on search settings and then &lt;b&gt;Click &lt;/b&gt;on Start update now.&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;That&amp;#39;s it. The scope &amp;quot;FileShare&amp;quot; must be available on the scopes dropdown of the search box webpart. If it does not, you would want to make sure that show scope dropdown option is selected for the webpart.&lt;/p&gt;
&lt;a href="http://del.icio.us/post?url=http%3a%2f%2fsharepointsearch.com%2fcs%2fblogs%2fsanjaya%2farchive%2f2009%2f06%2f10%2fhow-to-search-documents-from-a-file-share-only.aspx&amp;tags=&amp;title=Restrict+search+to+return+documents+from+a+File+Share+only%3f+"&gt;Del.icio.us&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="http://digg.com/submit?phase=2&amp;url=http%3a%2f%2fsharepointsearch.com%2fcs%2fblogs%2fsanjaya%2farchive%2f2009%2f06%2f10%2fhow-to-search-documents-from-a-file-share-only.aspx&amp;title=Restrict+search+to+return+documents+from+a+File+Share+only%3f+&amp;tags="&gt;Digg It&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="http://technorati.com/cosmos/search.html?url=http%3a%2f%2fsharepointsearch.com%2fcs%2fblogs%2fsanjaya%2farchive%2f2009%2f06%2f10%2fhow-to-search-documents-from-a-file-share-only.aspx&amp;tags="&gt;Technorati&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="http://blinklist.com/index.php?Action=Blink/addblink.php&amp;url=http%3a%2f%2fsharepointsearch.com%2fcs%2fblogs%2fsanjaya%2farchive%2f2009%2f06%2f10%2fhow-to-search-documents-from-a-file-share-only.aspx&amp;Title=Restrict+search+to+return+documents+from+a+File+Share+only%3f+&amp;tags=" &gt;Blinklist&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="http://furl.net/storeIt.jsp?t=Restrict+search+to+return+documents+from+a+File+Share+only%3f+&amp;u=http%3a%2f%2fsharepointsearch.com%2fcs%2fblogs%2fsanjaya%2farchive%2f2009%2f06%2f10%2fhow-to-search-documents-from-a-file-share-only.aspx&amp;tags="&gt;Furl&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="http://reddit.com/submit?url=http%3a%2f%2fsharepointsearch.com%2fcs%2fblogs%2fsanjaya%2farchive%2f2009%2f06%2f10%2fhow-to-search-documents-from-a-file-share-only.aspx&amp;title=Restrict+search+to+return+documents+from+a+File+Share+only%3f+&amp;tags=" &gt;reddit&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="http://www.dotnetkicks.com/submit/?url=http%3a%2f%2fsharepointsearch.com%2fcs%2fblogs%2fsanjaya%2farchive%2f2009%2f06%2f10%2fhow-to-search-documents-from-a-file-share-only.aspx&amp;title=Restrict+search+to+return+documents+from+a+File+Share+only%3f+&amp;tags=" &gt;DotNetKicks&lt;/a&gt;&lt;img src="http://sharepointsearch.com/cs/aggbug.aspx?PostID=25740" width="1" height="1"&gt;</description><category domain="http://sharepointsearch.com/cs/blogs/sanjaya/archive/tags/Search+scopes/default.aspx">Search scopes</category><category domain="http://sharepointsearch.com/cs/blogs/sanjaya/archive/tags/Search+scopes+faqs/default.aspx">Search scopes faqs</category><category domain="http://sharepointsearch.com/cs/blogs/sanjaya/archive/tags/configure+scope+to+return+documents+from+fileshare/default.aspx">configure scope to return documents from fileshare</category></item></channel></rss>