Index: CHANGELOG.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/CHANGELOG.txt,v
retrieving revision 1.1.2.112.2.5
diff -u -p -r1.1.2.112.2.5 CHANGELOG.txt
--- CHANGELOG.txt	13 Oct 2009 06:56:23 -0000	1.1.2.112.2.5
+++ CHANGELOG.txt	23 Oct 2009 10:13:32 -0000
@@ -5,6 +5,7 @@ Apache Solr integration x.x-x.x, xxxx-xx
 
 Apache Solr integration 5.x-2.x, 2009-09-22
 ------------------------------
+#580404 by pwolanin, allow per-node-type comment exclusion.
 #597174 by Frando, add hook_apachesolr_prepare_query() to enable custom sorts.
 #551582 by claudiu.cristea Add callbacks to lookup values based on key for CCK fields.
 #590982 by swentel fix warnings on indexing.
Index: README.txt
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/README.txt,v
retrieving revision 1.1.2.1.2.25.2.4
diff -u -p -r1.1.2.1.2.25.2.4 README.txt
--- README.txt	13 Oct 2009 06:56:23 -0000	1.1.2.1.2.25.2.4
+++ README.txt	23 Oct 2009 10:13:33 -0000
@@ -128,6 +128,9 @@ behavior:
  - apachesolr_tags_to_index: the list of HTML tags that the module will index
    (see apachesolr_add_tags_to_document()).
 
+ - apachesolr_exclude_comments_types: an array of node types. Any type listed
+   will have any attached comments excluded from the index.
+
  - apachesolr_ping_timeout: the timeout (in seconds) after which the module will
    consider the Apache Solr server unavailable.
 
Index: apachesolr.index.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.index.inc,v
retrieving revision 1.1.2.6.4.4
diff -u -p -r1.1.2.6.4.4 apachesolr.index.inc
--- apachesolr.index.inc	8 Oct 2009 11:40:28 -0000	1.1.2.6.4.4
+++ apachesolr.index.inc	23 Oct 2009 10:13:33 -0000
@@ -68,7 +68,12 @@ function apachesolr_node_to_document($ni
 
     // Fetch extra data normally not visible, including comments.
     $extra = array();
+    $exclude_comments = in_array($node->type, variable_get('apachesolr_exclude_comments_types', array()), TRUE);
     foreach (module_implements('nodeapi') as $module) {
+      if ($exclude_comments && $module == 'comment') {
+        // Don't add comments.
+        continue;
+      }
       if ($output = module_invoke($module, 'nodeapi', $node, 'update index', NULL, NULL)) {
         $extra[$module] = $output;
       }
Index: apachesolr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/apachesolr/apachesolr.module,v
retrieving revision 1.1.2.12.2.161.2.3
diff -u -p -r1.1.2.12.2.161.2.3 apachesolr.module
--- apachesolr.module	8 Oct 2009 19:34:30 -0000	1.1.2.12.2.161.2.3
+++ apachesolr.module	23 Oct 2009 10:13:33 -0000
@@ -217,6 +217,8 @@ function apachesolr_comment($edit, $op) 
     case 'delete':
     case 'publish':
     case 'unpublish':
+      // TODO: do we want to skip this if we are excluding comments 
+      // from the index for this node type?
       apachesolr_mark_node($edit['nid']);
       break;
   }
