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
#2
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
We were able to fix this by getting rid of core search patch and changing the 3 drupal search tables to type "blackhole"
#4
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
#5
#6
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
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
fixed in DRUPAL-5--1-0
#9
Automatically closed -- issue fixed for two weeks with no activity.