kentico_pavelk
-
7/30/2008 8:36:21 AM
RE:Search results ranking
Hello,
Thank you for your post.
You can find information how to write your own search provider in our Developer's guide:
http://www.kentico.com/docs/devguide/index.html?development_of_a_custom_search.htm
Could you please write this piece of code insted of the code mentioned in Step 6 in Developer's guide?
CMS.SearchProviderSQL.SearchProvider standardSearchProvider = new CMS.SearchProviderSQL.SearchProvider();
DataSet ds = standardSearchProvider.Search(siteName, searchNodePath, cultureCode, searchExpression,searchMode, searchChildNodes, classNames, filterResultsByReadPermission, searchOnlyPublished,whereCondition, orderBy);
if (ds.Tables.Count > 0) { int i = 1;
foreach (DataRow dr in ds.Tables[0].Rows) {
dr["SearchResultName"] = Convert.ToString(i) + ". " + (string)dr["SearchResultName"]; i++;
}
}
return ds;
Best regards, Pavel Knotek
|