Group search result by content type
I have used same thing in Drupal 7 . Please check if this can help 

Function custom_preprocess_search_results(&amp;$variables) {
  $variables['search_results'] = '';
  $resultTypes = array();

  // Divide results
  foreach ($variables['results'] as $result) {
    $resultTypes[$result['bundle']][] = $result;   
  }

  // Create fieldsets
  foreach ($resultTypes as $resultType =&gt; $resultTypeResults) {
    $value = '';


    foreach ($resultTypeResults as $result) {
      $value .= theme('search_result', array('result' =&gt; $result, 'module' =&gt; $variables['module']));



  $variables['search_results'] .= theme('fieldset', array('element' =&gt; array('#title' =&gt; $resultType, '#children' =&gt; $value));
  }
}