I manage an ubercart store that is indexed by Apache Solr. The search indexes the sell price and it's one of the facets. However, the price is nowhere in search-result.tpl.php. It's also not available in the search results preprocess hook in template.php. Is there somewhere else I can inject it into the search results without performing a separate database query for each search result.
You can index it using solr's dynamic fields (see your schema.xml in the solr conf directory) and a custom module hook, namely
Then you can, at search time, add the field you have indexed into the fields being fetched. For this you have three hooks or 'hooks' to choose from:
For further information on the hooks, see the README.txt in the apachesolr module directory.
Then in your search-result.tpl.php you'll have available the custom indexed field as