--- freelinking.module	2009-06-16 22:44:05.310385993 -0700
+++ freelinking.module_backlinks	2009-06-16 23:01:16.980498759 -0700
@@ -121,4 +121,22 @@ function freelinking_settings() {
   return system_settings_form($form);
 } // endfunction freelinking_settings (admin settings)
 
+/**
+* Add the results of freelinking filter processing to the search index
+* Note that this ignores any other filters in the node's format
+*/
+function freelinking_nodeapi(&$node, $op) {
+  switch($op)
+  {
+    case 'update index':
+      if (in_array ('freelinking_filter', filter_list_format($node->format))) {
+        $text = freelinking_filter ('process', 0, -1, $node->body);
+        preg_match_all ('/\<a.*freelinking.*\/a\>/U', $text, $matches);
+        $output = implode (', ', $matches[0]);
+        return $output;
+      }
+    break;
+  }
+}
+
 // vim: tw=300 nowrap syn=php
