Sure here is some sample code... I add two new columns to the search result dataset, and then use eval to display them in the transformation.
// Search
DataSet results = SearchHelper.Search(searchText, SearchHelper.GetSort(srt), path, DocumentTypes, culture, defaultCulture, CombineWithDefaultCulture, CheckPermissions, SearchInAttachments, Indexes, displayResults, startPosition, numberOfProceeded, (UserInfo)CMSContext.CurrentUser, out numberOfResults, AttachmentsWhere, AttachmentsOrderBy);
if (results != null)
{
string documentType = "documentType";
results.Tables[0].Columns.Add(documentType);
foreach (DataRow dr in results.Tables[0].Rows)
{
if (dr["type"].ToString() == "cms.document")
{
string idField = dr["id"].ToString().Split(';')[1];
idField = idField.Split('_')[0];
int id = Convert.ToInt32(idField);
var tree = new CMS.TreeEngine.TreeProvider();
var node = tree.SelectSingleNode(id);
switch (node.NodeClassName)
{
case "custom.Article":
dr["image"] = "~/icon_articles.png";
dr[documentType] = "Article";
break;
case "custom.News":
dr["image"] = "~/icon_news.png";
dr[documentType] = "News/event";
break;
case "custom.Resource":
dr["image"] = "~/icon_resources.png";
dr[documentType] = "Resource";
break;
}
}
else if (dr["type"].ToString() == "forums.forum"){
dr[documentType] = "Discussion";
}
else if (dr["type"].ToString() == "cms.user")
{
dr[documentType] = "Member profile";
}
}
}