Hi all,

I am using solr and I have disabled content search. I have about 2,500,000 nodes. When cron runs, the nodes get pushed to solr, but drupal is also indexing them. This does not work. Can this module be fixed so that does not happen? Should I write yet another solr module that does not rely on search to do its work?

CommentFileSizeAuthor
#4 coresearches_20080603.patch5.41 KBjpd972

Comments

Sara Konrole’s picture

Category: support » bug
robertdouglass’s picture

Interesting. Did you apply the patch to Drupal core that comes with the module? The patch is what removes stuff from core (like the indexing of the nodes).

Sara June’s picture

We were able to fix this by getting rid of core search patch and changing the 3 drupal search tables to type "blackhole"

jpd972’s picture

StatusFileSize
new5.41 KB

Hello,

We had the same issue. Attached is a patch that:
- removes node_update_index from node.module
- remove search_update_totals from search.module and add it to contentsearch.module
- looks for hook_update_totals in modules and registers that as a shutdown function

jaydub’s picture

Status: Active » Needs review
jaydub’s picture

I think there's a problem in the patch from #4.

It looks like you are removing the module_invoke for
hook_update_index. Also the IF statement 'if (module_hook($module, 'update_totals')) {'
doesn't appear to have a closing brace.

-/**
  * Implementation of hook_form_alter().
  */
 /*
--- a/modules/search/search.module	2008-06-03 17:11:58.000000000 -0400
+++ b/modules/search/search.module	2008-05-15 15:55:26.000000000 -0400
@@ -309,37 +309,14 @@
 function search_cron() {
   // We register a shutdown function to ensure that search_total is always up
   // to date.
-  register_shutdown_function('search_update_totals');
-
-  // Update word index
   foreach (module_list() as $module) {
-    module_invoke($module, 'update_index');
+    if (module_hook($module, 'update_totals')) {
+      register_shutdown_function($module . '_update_totals');
   }
 }
robertdouglass’s picture

When we get this patch correctly implemented I will add it as-is to the package, as a separate patch. There are valid reasons why you would want to keep indexing even with core searches disabled (views fastsearch, faceted search, etc.), but I also acknowledge that if you *don't* want to index, you should be able to turn it off. Keep working on the patch, though.

robertdouglass’s picture

Status: Needs review » Fixed

fixed in DRUPAL-5--1-0

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.