If you have older code from Kentico 11 and below that depends on the search results to be dataset you can use the following below to convert CMS.Search.SearchResult to a DataSet. This will convert a List of objects to a dataset for you.
public DataSet ConvertToDataSet<T>(IList<T> list)
{
DataSet dsFromDtStru = new DataSet();
DataTable table = new DataTable();
PropertyInfo[] properties = typeof(T).GetProperties();
foreach (PropertyInfo prop in properties)
{
table.Columns.Add(prop.Name, prop.PropertyType);
}
foreach (T item in list)
{
DataRow row = table.NewRow();
foreach (PropertyInfo prop in properties)
{
row[prop.Name] = prop.GetValue(item);
}
table.Rows.Add(row);
}
dsFromDtStru.Tables.Add(table);
return dsFromDtStru;
}