diff -up -r -N apachesolr_attachments.admin.inc apachesolr_attachments.admin.inc
--- apachesolr_attachments.admin.inc	2010-11-13 21:53:19.968750000 +1300
+++ apachesolr_attachments.admin.inc	2010-11-13 22:10:50.656250000 +1300
@@ -34,6 +34,16 @@ function apachesolr_attachments_settings
     '#options' => array('0' => t('No'), '1' => t('Yes')),
     '#default_value' => variable_get('apachesolr_attachments_exclude_types', 1),
   );
+  $form['apachesolr_attachments_file_source'] = array(
+    '#type' => 'checkboxes',
+    '#title' => t('Extract text from'),
+    '#options' => array(
+      'file_attachment' => t('File attachments'),
+      'cck_file_field' => t('CCK File fields'),
+      'body' => t('Body field (find files from hyperlinks)'),
+      ),
+    '#default_value' => variable_get('apachesolr_attachments_file_source', array()),
+  );
   $form['apachesolr_attachment_extract_using'] = array(
     '#type' => 'radios',
     '#title' => t('Extract using'),
@@ -310,17 +320,26 @@ function apachesolr_attachments_add_docu
  */
 function apachesolr_attachments_get_indexable_files($node) {
   $files = array();
+  $sources = variable_get('apachesolr_attachments_file_source', array());
 
-  if(!empty($node->files)) {
+  if($sources['file_attachment'] && !empty($node->files)) {
     $files = $node->files;
   }
 
-  $fields = apachesolr_attachments_get_cck_file_fields();
-  foreach ($fields as $field) {
-    if(!empty($node->$field)) {
-      $files = array_merge($files, $node->$field);
+  if ($sources['cck_file_field']) {
+    $fields = apachesolr_attachments_get_cck_file_fields();
+    foreach ($fields as $field) {
+      if(!empty($node->$field)) {
+        $files = array_merge($files, $node->$field);
+      }
     }
   }
+  
+  if ($sources['body']) {
+    $body_fields = apachesolr_attachments_get_body_files($node);
+    $files = array_merge($files, $body_fields);
+  }
+  
   $file_list = array();
   foreach ($files as $file) {
     // Some are arrays others are objects, treat them all as objects
@@ -383,6 +402,38 @@ function apachesolr_attachments_get_cck_
 }
 
 /**
+ * Return file objects for each file referenced in the body field of the node
+ */
+function apachesolr_attachments_get_body_files($node) {
+  $files = array();
+  
+  if (!empty($node->body)) {
+    //this regex extracts the string from the href property in a tags
+    $regex_pattern = "/<\s*a\s+[^>]*href\s*=\s*[\"']?([^\"' >]+)[\"' >]/";
+    preg_match_all($regex_pattern, $node->body, $matches);
+    $files_to_find = array();
+    $file_directory_path = file_directory_path();
+
+    foreach ($matches[1] as $match) {
+      //clean the string so that each file starts with the file directory - this deals with absolute urls or leading slashes
+      $files_to_find[] = urldecode(substr($match, strpos($match, $file_directory_path)));
+    }
+
+    if (!empty($files_to_find)) {
+      $placeholders = substr(str_repeat("'%s',", count($files_to_find)), 0, -1);
+      $query = "SELECT * FROM {files} WHERE filepath IN ($placeholders)";
+      $result = db_query($query, $files_to_find);
+      while ($row = db_fetch_object($result)) {
+        $files[] = $row;
+      }
+    }
+  }
+
+  return $files;
+}
+
+
+/**
  * Parse the attachment getting just the raw text.
  *
  * @throws Exception
diff -up -r -N apachesolr_attachments.install apachesolr_attachments.install
--- apachesolr_attachments.install	2010-11-13 22:11:16.453125000 +1300
+++ apachesolr_attachments.install	2010-11-13 22:10:29.890625000 +1300
@@ -146,3 +146,18 @@ function apachesolr_attachments_update_6
 
   return $ret;
 }
+
+/**
+ * Set defaults for newly introduced file sources
+ */
+function apachesolr_attachments_update_6003() {
+  $ret = array();
+  
+  variable_set('apachesolr_attachments_file_source', array(
+    'file_attachment' => 'file_attachment',
+    'cck_file_field' => 'cck_file_field',
+    'body' => 0
+    ));
+
+  return $ret;
+}
