Index: readme.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/solr/readme.txt,v
retrieving revision 1.1.2.13
diff -u -r1.1.2.13 readme.txt
--- readme.txt	14 Mar 2007 18:14:28 -0000	1.1.2.13
+++ readme.txt	29 Mar 2007 06:01:50 -0000
@@ -26,13 +26,25 @@
       
     // data to be posted to Solr for this node
     case 'data':
-      return sprintf(
-        '<add><doc><field name="nid">%s</field><field name="title">%s</field><field name="body">%s</field></doc></add>',
-        $node->nid,
-        htmlspecialchars($node->title, ENT_QUOTES),
-        htmlspecialchars(strip_tags($node->body), ENT_QUOTES)
+      $fields = array(
+        'nid' => $node->nid,
+        'title' => $node->title,
+        'body' => $node->body,
       );
-      
+      // Fetch extra data normally not visible
+      foreach (module_implements('nodeapi') as $name) {
+        $function = $name .'_nodeapi';
+        $result = $function($node, 'update index', NULL, NULL);
+        if (isset($result)) {
+          $fields[$name] = $result;
+        }
+      }
+      $output = '<add><doc>';
+      foreach ($fields as $name => $value) {
+        $output .= '<field name="'. $name' .'">'. htmlspecialchars(strip_tags($value), ENT_QUOTES) .'</field>';
+      );
+      $output = '</doc></add>';
+      return $output;
     // receives an array of search results from solr.module and returns an array of items for display
     case 'search':
       $results = array();
