Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am running a pretty standard SharePoint 2010 intranet site whose primary functionality is to act as a central repository for documents. When I search for an item on the site, each individual result contains the following (in order):

  1. Header within document
  2. A portion of the document highlighting where the search terms are found
  3. Author, Date, Size
  4. URL of document/item

After some initial testing, the project sponsors want the following changes to the search results:

  • Remove the Author, Date, Size and URL information
  • Instead of displaying the header within the document, they want the document Title to be displayed

Resulting in the following:

  1. Title of document
  2. A portion of the document highlighting where the search terms are found

How would I go about making these changes to the search results? I am using the default search contained in the global navigation so far and have not done much to search beyond configuring the scope/crawling settings. Is there a better way to be implementing search than what I have done so far?

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

You need to edit the XSLT that is used to transform the search results.

You can either do this by editing the in-line XSLT in the search results web part (in the edit part of the web part), or you can export the web part and configure it to use the XSLT files found in http:///Style Library/XSL Style Sheets/

Here you will find ItemStyle.xsl, Header.xsl and others.

Read this guide on MSDN on how to proceed. More about customizing search results here

share|improve this answer
    
I am trying to follow along with the sites you have linked, but a log of them refer to a results.aspx page that I do not seem to have on my site. I do, however, have an OSSSearchResults.aspx page, however, this page does not appear to be editable. Should I have enabled something or configured search in a different way? –  Psycho Bob Aug 31 '10 at 18:01
1  
the references point to enterprise search center and basic search center. You will need to create a search center site with one of the two and then in Site Settings > Site Collection Administration > search settings point to the search center and search results page –  Anders Rask Sep 1 '10 at 7:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.