Using tabs in the Enterprise Search Center in SharePoint Server 2010

When I give search presentations, one of the demos I always do is about showing users how to do some quick and easy customizations to the Enterprise Search Center to improve the search experience a little better. 

Just a quick note before we get into things too deeply. This blog post is specifically for users with SharePoint Server 2010 or Search Server Express 2010.  If you happen to have FAST Search for SharePoint (FS4SP) the process for creating scopes will be different, but the same concepts would apply.  In fact, you’ll be able to create scopes if you FS4SP the way I describe but you might get incorrect results. 

For more information on creating scopes with FS4SP check out these great blog posts:

http://blogs.msdn.com/b/jorgeni/archive/2010/02/26/search-scopes-in-fast-search-for-sharepoint-part-1.aspx

http://blogs.msdn.com/b/jorgeni/archive/2010/03/11/search-scopes-in-fast-search-for-sharepoint-part-2.aspx

Scenario:

Just about every organization has a need for scopes.  If you aren’t familiar with what a search scope is, you can think of it this way: All of the content that has been crawled by SharePoint is tossed into an index – like the index of a book.  But the issue is, that sometimes you might just one to look at a small piece of that content.  Maybe just content from a specific department, or all content tagged with a specific piece of metadata (maybe you wanted to only search within documents that were tagged as “proposals”).  A scope is what makes this possible.

One thing I suggest in my session, is that you could move old content to an archive location.  This could be a specific site, separate site collection or web application, or even a metadata flag on the content itself.  Either way, the goal is the same – get the older information out of your active search results.  But sometimes, users want to search the archives.

    In this example, I’ll walk you through the steps about how to create a scope and set up the Enterprise Search Center with a separate tab your users can use to specifically search the archive.

    1. For this demo I’m using an Enterprise Wiki as my starting point.  If you are using a different template, your steps might be slightly different.  But for the first step, you’ll want to create an Enterprise Search Center if you don’t already have one.  To do this, you’d simply need to click Site Actions > New Site then click on the Enterprise Search Center.  Give the site a title and URL and hit the Create button.

    2. The next step is to create a scope.  You’ll need to make sure you have Site Collection Administrator permissions.  Click on Site Actions > Site Settings and then from under the Site Collection Administration section click on Search Scopes.

      3. From the Toolbar click the New Scope button.

      The create scope page will open, for the purposes of this demo you can simply fill in a Title for the scope and then hit OK.

      4. This will take you back to the View Scopes page.  You should see your newly created scope listed here, but you’ll notice that under the Update Status column it will say “Empty – Add rules.”  To add rules, click on the Add Rules link.

      5. On the Add Scope Rule page, at the top you’ll see you’ve got 3 options for scopes: Web Address, Property Query, and All Content.  In this example we’ll use the Web Address option.  However, the Property Query option is useful if you wanted to create a scope based on specific metadata values.

      For the folder value, I’m just going to use one of my existing document libraries. So I’m going to cut and paste the URL into this field and remove the /Forms/AllItems.aspx part of the URL since it isn’t needed.

      Then for the behavior section at the bottom, I’m going to leave Include selected and hit the OK button.

      image

      6. You’ll notice that when the View Scopes page loads that your new scope will likely need some time before it gets populated.  In my case, it’ll be another 6 minutes.  I With many other search related activities there’s a bit of waiting involved.  I usually take this time to catch up on my web surfing Smile

      image

      7. Once your scope has been created, it is time to head over to the Enterprise Search Center you created in the first step.  Specifically, the results page.  In my case the URL is: http://demo.contoso.com/search/Pages/results.aspx

      It is okay if the page throws an error if there are no results.  But if it would make you feel better, you can always execute a query.

      8. Put the page into edit mode by clicking Site Actions > Edit Page.

      At the top of the page click the Add New Tab link:

      image

      9. On the tab page, be sure to give it a Tab Name and enter a value for the Page.  In this case, it is important to remember that when you enter the page name you need to include the full name of the page.  In my case, it was archive.aspx.  Then hit the Save button.

      image

      10. You’ll notice that the new tab has been created, but if you click on it you’ll get an error.  Don’t worry.  All we need to do is just create the page.  And to do that click on Site Actions > New Page.  Then press the Create button.  In this case, we’ll call the page ‘Archive’ – no need for the .aspx.  I know it isn’t consistent.  Don’t blame me – I just write blog posts.

      image

      11. Once the new page has been created, there’s a couple quick modifications we’ll need to make to a couple of the web parts.  First, modify the Search Box web part by clicking the Edit Web Part.  When the web part properties menu opens, expand the Miscellaneous section and edit the Target search results page URL to point to itself.  The goal here is that when someone does a search from this tab, we want to make sure it doesn’t redirect them to another page.  Once complete scroll down to the button and press OK.

      image

      12. Next, edit the Search Core Results web part.  Expand the Location Properties section and enter the name of the scope you created earlier. This will make sure that the results displayed in this web part are restricted to the scope we created.  Press OK when you are done.

      image

      Then all you’ve got to do is Check in your page and give it a test. Just remember to publish the page if you want to enabled all users to see this.  You can run a query against the All Sites scope and you should get back a big number, and then you click over to the new tab you’ll be only getting results back from your new scope – which should yield far fewer results.

      Happy Searching!

      Advertisements

      Quick Tips for Improving Search in SharePoint 2010

      Many organizations implement SharePoint for a number of different reasons including collaboration, content management, business intelligence, process improvement, and many others. These are areas where organizations are leveraging the vast capabilities of SharePoint 2010 to allow their users to work smarter and not harder.

      But one area that many organizations seem to forget about is the powerful enterprise search capabilities that are available out of the box with SharePoint 2010. Search tends to be one of those areas with SharePoint that “just works,” so what usually happens in an organization is that the farm gets setup and search gets configured — results come back and it is assumed that everything must be working. Right? This approach is very common which is why when I go to work with different companies I often hear the same story about how “Search is broken” or “search sucks.” But the fact of the matter is that in order to work to its full potential, search can’t be entirely an afterthought. However, getting better results from search doesn’t require a lot of effort.

      Before we can get into any search discussion we’ve got to start with the key measuring stick for determining whether any search engine works — relevancy. Relevancy is just another way of saying “did you find what you were looking for?” Users who have negative things to say usually aren’t finding what they are looking for and therefore have an issue with relevancy. The following are a few quick and easy ways to improve relevancy across your organization with very little effort.

      Put more important documents near the root of the site, less important documents farther down the hierarchy — They say the cream always rises to the top, and with search the same is true. There are many factors that work together to determine the relevancy of a document but one rule of thumb is that the deeper the document is buried in your hierarchy the less relevant SharePoint is going to assume the document is in comparison to a similar document closer to the root. As a rule of thumb, the less “/” in a URL to a piece of content the more relevant it is. For example a document at http://sales/sharepoint-presentation.docx would be considered more relevant that http://sales/products/sharepoint-presentation.docx.

      Just remember that you can use this to your advantage. Less important documents and sites can be nested deeper in your hierarchy and more important ones can be closer to the top.

      Use natural language for site and file names — Among the easiest and most effective things people can do to improve search relevancy is to name their sites and files effectively. Look at these two URLs:

    1. http://sales/north-america/presentations/april-2011-widgets.docx
    2. http://slsna/p_wdgts411.docx
    3. The first document has a URL which has actual words used for the sites and document where the second one has some shorthand for the sites and document names. The first one is far more effective because the URL and file names for a document in SharePoint are a heavily weighted component of the relevancy algorithm. If you were to type a search query of “sales presentations widgets” SharePoint would be able to determine clearly that the first document was relevant to the query. Although the second document might have some of those words typed somewhere in the content, and would likely still show up somewhere in the results — the first one will be considered more relevant simply because of the way it is named.

      It should also be noted that in order for this to work as effectively as possible it is important to NOT run your words together. This is because SharePoint doesn’t know where words break unless you’ve got something between them that it identifies as a “wordbreaker.” Although spaces are recognized as a word breaker in SharePoint, my recommendation is to use “-“ between words instead. The main reason for this is because if you use spaces in things like site or page names when SharePoint will automatically remove them and you’ll lose out on the relevancy benefit you’d get otherwise. Other common word breakers that get used are things like underscores (_), periods, semi-colons. If you happen to be using these, they are also all valid word breakers.

      Supply metadata for your files — If you aren’t familiar with the term metadata it basically means “data about data.” If you were talking about a car some common pieces of metadata would be make, model, color, mileage — think about the types of things you’d use to find a car on a web site. All of those pieces of data describe the car; they are its metadata.

      For your files in SharePoint, by tagging them with descriptive metadata you can make it easier for your users to find what they are looking for. Remember, that metadata is always going to carry a heavier relevancy weight than content in the body of a document.

      How much metadata do you need? Generally I recommend 5 to 10 fields that would be useful for categorizing a file. Common examples would be: department, product name, type of document, client, etc. The key to metadata is that it needs to be clear and consistent. Here are a few metadata recommendations:

    4. Use managed metadata fields, choice, or lookup fields so your users don’t have to manually type in metadata to ensure consistency.
    5. Make as much of it required as possible – if you don’t your users likely won’t fill it out!
    6. Resist the temptation to add too many fields. The idea is to make it easier for your users to find things, not make them have to take an hour to upload documents.
    7. Summary

      This article covered just a few basic tips, but even though they may seem small, they can have a huge impact on search relevancy for your users. And the best part is that it doesn’t take any custom code or even a lot of effort. The end result should be that users will spend less time looking for things in SharePoint which can add up to tons of ROI. Managers like things that bring ROI and it usually puts them in a better mood when it is time to do performance reviews!