Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 2008

Customize Search Features in Microsoft Office SharePoint Server 2007

MOSS gives site admins the tools to target searches to users' needs
RSS
Subscribe to Windows IT Pro | See More Administration Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Customize Search Results
By default, the Search Center displays results in the results.aspx page. You can customize this page or create your own results page. For example, consider the document library with the custom Color Category field. When a user searches against the Catalog scope, you want the search results page to display a field named Color Category. You can achieve this by modifying the XSL markup of the Search Core Results Web part in the search results page.

Start by performing a search with the Catalog scope so that you get a results page where only items that fall within the Catalog scope are displayed. After you have such a page, follow these steps to create a new search results page:

  1. Click Site Actions, Create Page.
  2. Enter a Title (e.g., Catalog Results) and a URL Name (e.g., catalogresults.aspx) for the new page.
  3. Select the (Welcome Page) Search Results Page layout, then click Create.

    After step 3, you’ll see the catalogresults.aspx page in edit mode, which shows its various Web parts. Search Core Results is the Web part that displays the search results. You need to modify this Web part to include the Color Category column in the search results view. In the Search Core Results Web part, click edit, Modify Shared Web Part. This action displays the Web part properties tool pane. As Figure 4 shows, the tool pane contains the following categories:
    Results Display/Views—In this section, you specify search results to display per page, sentences to show in the results display, and so forth.
    Results Query Options—This section lets you specify options such as duplicate results removal, search term stemming, and noise word inclusion. Word stemming matches a search word with its grammatical variants; for example, the word crawl stems to crawls, crawled, crawler, and so forth. Noise words, also known as stop words, are words that aren’t significant indicators for content, such as the word the.
    Fixed Keyword Query—This section lets you enter a specific keyword to automatically include with every search
    Miscellaneous—Here you can narrow the scope of search results, and also choose options such as Show Action Links, Display “Alert Me” Link, Display “RSS” Link, and so forth.
    Below these categories, you’ll find the Data View Properties section, which contains the XSL markup that controls the HTML to render the search results dataset. So, to continue the process of customizing the results page:
  4. Expand the Results Query Options category.
  5. Add the following line of XML to the Columns node in the Selected Columns text box, then click OK:
     <Column Name=”ColorCategory”/>
    Remember that we’ve already defined the ColorCategory column. The SharePoint search engine returns data internally in XML format. This XML data is transformed to an HTML view through XSL markup.
  6. Under the Data View Properties section, click XSL Editor to display the Text Entry dialog box with the XSL markup that renders the XML results into HTML.
  7. Copy the XSL markup to an external text editor, such as Microsoft Office Share- Point Designer 2007. SharePoint Designer is a WYSIWYG editor, so it helps you visualize the results of the XSL code as you edit.
  8. Locate the result template node in the markup; its first line looks like this:
     <xsl:template match=”Result”>  
  9. Add the following before the line
     Color Category: <xsl:value-of
      select=”colorcategory” />
    Note that the value colorcategory is written in all lower case, regardless of how it was written in metadata property mapping.
  10. Copy and paste the entire XSL markup back into the Text Entry dialog box, then click Save.
  11. Click OK to save changes to the XSL markup and the Web part.

Now when you perform a search using the search box, you’ll see the Color Category property exposed in the search results area. By following these steps, you can expose any property that’s already stored in the metadata

Control SharePoint Searches
You should now have a good idea of how you can customize the search experience in MOSS 2007. The procedures shown in this article, though simple, can easily be leveraged to create more meaningful business solutions that can crawl and index a large amount of disparate data, yet offer end users targeted search capabilities to zero in on a specific subset of data. Custom search scope definitions also let administrators schedule indexing and crawling of each scope separately: Only scopes with frequently changing contents need to be crawled frequently. This ability not only saves server resources, but it also makes the search results more accurate and fresh.

End of Article

   Previous  1  2  [3]  Next  


Reader Comments
efsaefee

blarg1234 July 02, 2008 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

The Desktop tab is missing from the Display Properties in Windows XP?

...

Are You an Ultimate Microsoft Customer ... Or Just a Good One?

Microsoft's trend toward making available multiple product editions has recently reached into surprising areas. ...


Related Articles Stsadm: Taking Control of SharePoint Administration

High Availability for MOSS 2007 Server Farms

SharePoint Server 2007 Unleashed

SharePoint Security Evolution

IIS and Web Administration Whitepapers The Five Secrets to Controlling Your SharePoint Environment

The Five Secrets to Controlling Your SharePoint Environment

Extended Validation SSL Certificates

Related Events Check out our list of Free Email Newsletters!

IIS and Web Administration eBooks Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

WinConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

Deploying SharePoint! In-Person Event Series – 8 Cities
Discover best practices and tips for deploying the perfect SharePoint infrastructure. Early Bird Price of $99 extended till Sept. 15th.

Find a new job now on the all new IT Job Hound!
Search jobs, post your resume, and set up job e-mail alerts!

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Top Tools for Virtualization Disaster Recovery & Replication
View this web seminar on August 14th to learn about two tools that will result in faster backup and restore with P2V disaster recovery.

SharePointConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

VMworld 2008 - Sign Up Today!
Join your peers on September 15-18 at The Venetian Hotel in Las Vegas as VMware hosts VMworld 2008, the leading Virtualization event.



When managing just VMware isn’t enough
Plan/Manage/Secure – NetIQ VMware management. Download whitepaper.

What’s up with your network? Find out with ipMonitor
Availability monitoring for servers, applications and networks – FREE trial

Microsoft® Tech•Ed EMEA 2008 IT Professionals
Advance your thinking with new ideas and practical real-world solutions at Microsoft’s FIVE day technical infrastructure conference 3-7 Nov., 2008. Register before 26 September 2008 to save €300.

Order Your Fundamentals CD Today!
Gain an introduction to Exchange, learn server security requirements, and understand how unified communications can play a role in your messaging strategies with this free Exchange CD.

Are You Really Compliant with Software Regulations?
View this web seminar that will help you with compliance best practices and check out a management solution to assure that you won’t be in jeopardy of an audit.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16 in London.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing