1,685 articles and 12,533 comments as of Thursday, September 2nd, 2010

Friday, July 18, 2008

EndUserSharePoint.com: Searching Site Collections Using a Tabbed Search Center

Author: Chris Quick
WSS Development

In a previous article in the Exploiting or Being Exploited By SharePoint Search series , we discussed how to create a simple Search Center that will allow you to search your team site for information. We have also discussed managed properties and scopes in previous articles.

It is now time to put all of our resources together to build a more complex search center that can be used to search multiple team sites housed in their own site collections. You will need to have MOSS standard edition to complete all of these steps.

Since this is a project I need to accomplish within my organization anyway, I’m going to document the steps as I complete them myself!

The Scenario

Our Technology Services department is divided into three sub-departments. Each sub-department has an individual team site contained in its own site collection. Each team site is used to collaborate on the various areas of responsibility – in our case this is the ERP management group, operations group and custom application development group. Each team needs to be able to share information with the other teams and resources need to be searchable across all of these sites.

These sites have recently been tied together with a Technology Services Team Site, but information has become difficult to find as it may be stored in the sub-group’s site or on the group team site. I have been tasked with creating a site specific search center that will allow searches only within the Technology Services team sites. It would also be nice if searches could be executed against individual team sites from the Technology Services department.

Planned Solution

I have decided that I am going to build a tabbed Search Center that will allow searches to be conducted against all sites or against a specific site. Since the groups maintain a large library of Visio and MindMap drawings, I want to allow searches to focus on that content to provide better results to the team. For brevity, I’m going to focus only on the Visio Drawings.

Preparing the Site

In the previous article, we had to turn on some Site Collection features to make use of the basic Search Center. Since I plan on using a tabbed Search Center, I will need to activate one more feature.

Note: To do this, you must be a Site Collection Administrator.

Navigate to your top level site and then click on Site Actions > Site Settings. Under Site Collection Administration, locate Site Collection Features and click on it. In the list of available features, ensure that the Office SharePoint Server Standard Site Collection Features has been activated.

Figure 01

Create a Search Center with Tabs Site

After activating this feature, a new site template has been made available for our use. This is the Search Center with Tabs available under the Enterprise tab. Click on Site Actions > Create to create new content. Locate Sites and Workspaces and click on it to begin creating a new site. Provide the information for the new site. Under templates, click on Enterprise and choose Search Center with Tabs.

Figure 02

Once SharePoint has finished creating the site, you should end up with something similar to the following:

Figure 03

The plan is to provide a scopes drop-down to allow searching individual sites and to create tabs for the various types of drawings. This way, I can also choose to create a new tab later to search for other content.

Creating Tabs

The tabs that are provided out of the box work fine for a generic site, but I would prefer to have the following tabs: All Content and Drawings. If you click on the provided tabs, you will move between multiple pages that were created with the site.

Tabs are maintained in two separate lists, Tabs in Search Pages and Tabs in Search Results. The first list controls the tabs available on the blank search pages while the second maintains the tabs for the results pages. To insure that my tabs show up properly, I need to make sure they are added to both lists. To view these lists, click on Site Actions > View All Site Content.

Creating Tabs in Search Pages

Under Lists, click on Tabs in Search Pages. You will notice there are two for All Sites and one for People. One is used for the standard search page and the other is used for the advanced search page. We will need to change the name for both of these.

Figure 04

Click on the Edit Icon next to All Sites – default.aspx and change the name from All Sites to All Content. Do not change the page name, we’re just going to modify the default page. Do the same for All Sites – advanced.aspx.

Figure 05

Go ahead and remove the People tab since we’re not going to be using this one. To do this, you will need to click on the edit icon and then choose delete item from the tool bar.

Figure 06

Add the new tab for Visio Drawings. To do this click on New in the toolbar.

7

Set the tab name to Visio Drawings and page to visiosearch.aspx (we’ll create this page soon). Optionally, you can provide a Tooltip that will be displayed if the mouse is hovered over the tab on the search pages. Click OK.

Figure 08

Creating Tabs in Search Results

Now that we have the search page tabs setup, we need to set up the same tabs in the Tabs in Search Results list. Click on Site Actions > View All Site Content. Locate the Tabs in Search Results list and open it by clicking on it.

First, we need to change the tab name for All Sites. Follow the steps above to rename the tab. We also need to go ahead and remove the People tab, so delete it using the steps above as well.

Next, create a new tab for the Visio Drawings page. Click on New and set the tab name to Visio Drawings. This time, we need to use a different page. Let’s use visioresults.aspx.

We need to provide a different name for the results. If we used the same page, when the tab is clicked on for a results page, your visitor would be taken back to the search page. Instead, we want them to go to a refined page with the same search criteria.

Creating Search and Result Pages

Now that the tabs setup, we need to create the pages for those tabs. Click on Site Actions > View All Site Content. Under Document Libraries, you will see a Pages library. Click on the pages library to open it. There are five pages already contained in this library. However, we need to create four additional pages that our tabs use. Before we create these pages, we need to clean up some pages that are no longer in use. Remove people and peopleresults from the library.


Figure 09

Create an empty search page for Visio Drawings. Click on New. Set the Title to Visio Drawings and the URL Name to visiosearch. For the page layout, choose (Welcome Page) Search Page. Click on Create.

Figure 10

Create the result pages for our new tab. To do this, click on New and set the Title to Visio Drawings Results with the URL Name visioresults. This time set the Page Layout to (Welcome Page) Search Results Page. Click on Create.

Figure 11

You should now have several pages in your pages library.

Figure 12

Defining Scopes

Now that I have my search center started, I need to create scopes that will help me target my results to those pages. I set up four new scopes (see my previous post on creating scopes). The scopes are:

  • Technology Services Team Sites
    This scope includes URL’s to all technology services team sites, four in all.
  • Enterprise Application Services
    This scope is for our development team. The only rule is a web address to the development team’s site collection.
  • Computer Support Services
    This scope is for our operations and help desk. It uses a web address rule to include content from their team site.
  • Information Services
    This scope is for our ERP management team. It uses a single rule that includes a web address for their content.

I placed these scopes into a new display group called Technology Services Team Sites.

Setting Up All Content

The first thing we need to do is complete the setup of our All Content pages to return results from any of my defined scopes. Open the default.aspx page by clicking on it and then choose Site Actions > Edit Page. Modify the Search Box web part by clicking on Edit > Modify Shared Web Part. Expand the Scopes Dropdown area and set the dropdown mode to Show Scopes Dropdown. To help my visitors understand the purpose of this site, I’m going to set the dropdown label to Site.

Figure 13

Expand the Miscellaneous area and locate the Scope Display Group. I need to set the name to my display group to Technology Services Team Sites. Notice that you have a Target Search Results Page URL in this area. We will use this later for our other tabs. Click OK. Also, go ahead and check in the page.

Figure 14

As discussed in my previous article on creating a team site search center, we need to make the same changes to our results page. To do this, you can execute a simple search and then make the changes or you can go back to the pages library and open the results.aspx page.

Setting up Visio Drawings and MindMap Drawings

Now, we are going to start making use of the managed properties that were discussed in my post Exploiting or Being Exploited By Search.

Open the visiosearch.aspx page. Set up the Search Box web part as described above, but we need to make some other changes before clicking OK. Open the Query Text Box area and place FileExtension:vsd in the Additional Query Terms field. This will append a managed property search to the end of our search terms.

Figure 15

Under Miscellaneous, we need to set the results page to our custom results page. Expand Miscellaneous and place visioresults.aspx in the Target search results page url field. Repeat these steps for the visioresults.aspx page as well.

Figure 16

Was Search Improved?

Let’s say I have a document on one of my team sites that is a visio drawing of the layout of the servers in our datacenter. I need to get to that document, but I don’t remember where it was stored or what it was called. I begin by performing my search from the intranet search center of our intranet. This is the search center that contains all content, no matter where it resides in our SharePoint implementation. Because I know this document will most likely have the name computer in it, I perform a search for computer. I am a bit overwhelmed because the search returns over 1,500 items.

Executing the same search in my new search center against all the Technology Services Team Sites, I return only 512 items. Wow, I’ve already trimmed almost 1,000 items from my search!

Since I know that the document is a Visio drawing, I choose the Visio Drawings tab and execute the same search for computer again. This returns only eight results which all show up on one screen. The document I’m looking for is the top listed item (1). However, conducting this search, I’m also able to see a drawing from our operations group that includes the network diagram(2). This might be a useful diagram in the future as we may need to add new servers to host some of our applications.

Figure 17

Conclusion

The goal of search is to be able to locate items that may have been long forgotten or that you were not aware existed. By creating a search center for your team site(s) — either a Simple Search Center or a more complex search center — you can greatly increase the discoverability of resources that your team produces and manages.
In this scenario, I was able to trim over 1,500 items to 8 possible choices, even using a generic search term. This helps my team remain more informed about available resources and improves their overall productiveness because they are spending less time searching for content.

We have also seen the number of duplicate resources go down as each person is better able to find the resources produced by the team as a whole. Additionally, this has improved the quality of content within our sites as we are now working with a set of documents maintained by the team versus a bunch of separate documents maintained by individuals.

Now it’s your turn. You’ve got enough info to start your own Search Center. Let me know what you come up with.

Chris QuickChris Quick
WSS Development
Moderator: Stump the Panel

View all entries in this series: ChrisQuick-EndUserSharePoint.com: Search»
 

Please Join the Discussion

One Response to “EndUserSharePoint.com: Searching Site Collections Using a Tabbed Search Center”
  1. Dean says:

    Chris, could you take this to the next level and provide some examples of customizing the search and search results pages. I am specifically interested in learning more about customizing how the results are displayed for people searches as well as for document searches. Thanks the helpful articles.

    Dean


Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!