One of the best new features of SharePoint 2007 is search. I was at a client’s the other day, working on search and we were getting some results back to certain queries, that contained information in the summery (or the Hit highlight area) that we didn’t want people seeing. I spent considerable time going over all the metadata of the pages, removing everything I could think from the metadata being crawled on the content, resetting the content and re-crawling the data. The information just wouldn’t go away. Because the pages themselves were fine to show up in the search, just not the hit highlight information, I decided to customize the search experience.I performed the search returning the content and started editing the search results page. I opened up the web part properties of the Search Result Core web part and started editing the XSL. There is a line in the XSL that is:

And goes on to say, display the high highlighted summery. I simply changed this line to read

Because the information is case sensitive, and the information was showing up both in upper and lower cases, I had to put both cases in. The allows the results of the certain search query to still appear, however, the hit highlight summery that contained the information is hidden from view.

Just another example of how the customizability of SharePoint can be used to enhance and secure a users experience.