? adminsearch.patch ? apachesolr_update_index_hook_moved_and_ref_fixed.diff ? call-time_reference_0.patch ? chunck.patch Index: README.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/README.txt,v retrieving revision 1.1.2.4 diff -p -u -r1.1.2.4 README.txt --- README.txt 4 Sep 2008 22:01:00 -0000 1.1.2.4 +++ README.txt 18 Sep 2008 06:00:34 -0000 @@ -42,3 +42,17 @@ Solution: To be able to use file_get_contents() in PHP, the "allow_url_fopen" directive must be enabled. In php.ini set the following value: allow_url_fopen = On + + +Developers +-------------- + +Exposed Hooks: + +@param &$document Apache_Solr_Document +@param $node StdClass +hook_apachesolr_update_index(&$document,$node) + +This hook is called just before indexing the document. +It allows you to add fields to the $document object which is sent to Solr. +For reference on the $document object, see SolrPhpClient/Apache/Solr/Document.php Index: apachesolr.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v retrieving revision 1.1.2.34 diff -p -u -r1.1.2.34 apachesolr.module --- apachesolr.module 17 Sep 2008 08:35:06 -0000 1.1.2.34 +++ apachesolr.module 18 Sep 2008 06:00:35 -0000 @@ -312,9 +312,6 @@ class ApacheSolrUpdate { try { $document = new Apache_Solr_Document(); - // Let modules add to the document - module_invoke_all('apachesolr_update_index', &$document, $node); - $fields = array('title', 'body', 'type', 'uid', 'changed', 'nid', 'comment_count', 'name', 'language'); foreach ((array)$node as $key => $value) { if (in_array($key, $fields)) { @@ -378,6 +375,13 @@ class ApacheSolrUpdate { } } $document->text = $text; + + // Let modules add to the document + foreach (module_implements('apachesolr_update_index') as $module) { + $function = $module .'_apachesolr_update_index'; + $function($document, $node); + } + $documents[] = $document; } catch (Exception $e) {