I've posted this at d.o, but I'm hoping maybe someone here might be able to help. (The documentation on apachesolr for D7 is so far rather depressing.)
I wrote a module for a D6 site implementing hook_apachesolr_process_results to modify the snippets of text shown on the search results page. That worked like a charm. We've now moved on the D7. I've again written a module to implement the same hook. This is a lowest-comment-denominator version of the function:
function mysearch_apachesolr_process_results(&$results, $query){
foreach($results as $id => $result){
$results[$id]['snippet'] = "FOOBAR";
}
debug_to_file($results);
}
The call at the end debug_to_file is a utility function I use to print_r a variable to a file. That call proves that a) my code IS indeed getting run and b) that the $results variable has been changed internally. However, my search results page has nary a FOOBAR
to be found!
Could it possibly be an interaction between apachesolr and another module? Apachesolr and my theme (fusion 7.x-1.x-dev)?
It'd even be helpful here to get an indication of what to try next as far as debugging. Any advice would be useful!
FTR, I'm using Drupal 7 with the ApacheSolr Search and Framework modules at version 7.x-1.0-beta12.