Content search disabled but drupal still indexes

Sara Konrole - April 13, 2008 - 14:50
Project:Core searches
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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?

#1

Sara Konrole - April 13, 2008 - 14:52
Category:support request» bug report

#2

robertDouglass - April 19, 2008 - 21:57

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).

#3

Sara June - May 6, 2008 - 19:31

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

#4

jpd972 - June 3, 2008 - 21:56

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

AttachmentSize
coresearches_20080603.patch5.41 KB

#5

jaydub - June 19, 2008 - 06:34
Status:active» patch (code needs review)

#6

jaydub - June 20, 2008 - 09:28

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');
   }
}

#7

robertDouglass - June 30, 2008 - 15:30

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.

#8

robertDouglass - July 7, 2008 - 11:19
Status:patch (code needs review)» fixed

fixed in DRUPAL-5--1-0

#9

Anonymous (not verified) - July 23, 2008 - 10:56
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.