'Apache solr search result view Drupal 7

I am working Apache solr search its working fine. But I need to change the search result to my view like title, date, short description and image.

Can you please someone help me. How to override the search result to custom result.tpl page.



Solution 1:[1]

There are several options :

  • Altering/adding template variables for individual search result by implementing hook_preprocess_search_result().
  • Altering the template file itself search-result.tpl.php (first you need to copy the original in your theme's templates folder).
  • The same can be done on the entire set of results (rows per page) using search-results.tpl.php & hook_preprocess_search_results().
  • Add custom CSS or override some rules in your theme.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 EricLavault