Searching by Using Content Types

You can use content types to establish search scopes. In SharePoint Server 2007, search scopes allow you to define and group a specific type, or source, of content to more granularly configure and categorize your search. For example, you could create a search scope in your site collection which includes content associated with the Document content type. Then, if you run a search query against that search scope, all content based on the content type of Document will be returned in the search results.

Search scopes can be created either through the Search Settings configuration page in Shared Services for an entire Web application or through the Search Scopes configuration on the root site of a site collection. For example, if you'd created a content type, Teamstatus, for Team Status reports and then wanted the ability to be able to search explicitly on Team Status reports for team members, you could establish a search scope for that content type. To create a search scope on the root site (Litware) of the Litware site collection and base the search scope on the Teamstatus content type, do the following:


You must be an administrator on the server to perform this action.

  1. Open the Site Settings page for the root site and click the Search Settings link under Site Collection Administration.

  2. Ensure that the Enable Custom Scopes And Search Center Features checkbox is selected as shown in Figure 15-29.

  3. Go back to the Site Settings page and click the Search Scopes link under Site Collection Administration to open the View Scopes page.

  4. From the toolbar on the View Scopes page, click New Scope.

  5. On the Create Scope page, shown in Figure 15-30, type a name for the search scope in the Title box, in this case Forms, along with a description.

  6. In the Display Groups section of the New Scope page, select both the Search Dropdown and Advanced Search check boxes.

    Selecting Search Dropdown includes the custom search scope name in the search drop-down list, as shown in Figure 15-31.

    Selecting the Advanced Search option includes the custom search scope name on the Advanced Search page as an additional scope that you can use in your search queries, as shown in Figure 15-32, in this case Forms.

  7. Click OK to return to the View Scopes page.

  8. Back on the View Scopes page, locate the Forms search scope and, from the Forms contextual drop-down menu, select Edit Properties and Rules.

  9. On the subsequent Scope Properties and Rules page, click on New Rule.

  10. On the Add Scope Rule page, in the Scope Rule Type section, select the Property Query option.

  11. In the Property Query section under the Add Property Restrictions list, select ContentType, as shown in Figure 15-33.

  12. In the Equal To field, type the content type you want to run a search against and then click OK. In this case, type Teamstatus so that you can search for Team Status reports entered by employees.

    SharePoint updates the new search scope and index content for that scope in the next scheduled crawl update.

  13. Type the query on the Advanced Search page to run the search against the new Forms search scope.


    You can also run the search from the drop-down search box on the home page of the Litware site.

    On the Advanced Search page, the new content type search scope, Forms, is included, and you can add search criteria against this new search scope.

  14. In the All Of These Words box, type the name Christine.

  15. Under Narrow The Search, Only The Scope(s), select the Forms search scope check box. Click Search.

    The search returns two records, both of which are Team Status reports. One report has been submitted by Christine Koch; the other report has been submitted where Christine Koch is the Manager. (See Figure 15-34.)

image from book
Figure 15-29: Enabling custom search scopes on a site

image from book
Figure 15-30: Create Scope configuration page

image from book
Figure 15-31: Search Dropdown including content type search scope

image from book
Figure 15-32: Advanced Search page including a content type search scope

image from book
Figure 15-33: Select content type for a query parameter

image from book
Figure 15-34: Search results based on a content type search scope

This example demonstrated how you can run search queries against content types. The Teamstatus content type was used to create a custom search scope and run a query on any forms associated with that content type. This is just one example of how you can use content types to enhance your search capabilities.

Microsoft Office Sharepoint Server 2007 Administrator's Companion
MicrosoftВ® Office SharePointВ® Server 2007 Administrators Companion
ISBN: 0735622825
EAN: 2147483647
Year: 2004
Pages: 299

Similar book on Amazon
Microsoft Office SharePoint Server 2007 Best Practices
Microsoft Office SharePoint Server 2007 Best Practices
Microsoft SharePoint 2010 Administrator's Companion
Microsoft SharePoint 2010 Administrator's Companion
Professional SharePoint 2010 Administration
Professional SharePoint 2010 Administration
Inside Microsoft  Office SharePoint  Server 2007
Inside Microsoft Office SharePoint Server 2007 © 2008-2017.
If you may any questions please contact us: