Closed (fixed)
Project:
Search by Page
Version:
7.x-1.x-dev
Component:
Search by Page Users module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Mar 2010 at 15:45 UTC
Updated:
15 Jan 2011 at 00:10 UTC
Search by Page Nodes should respond to node updates by marking nodes "needs reindex". Right now they are just being cycled through, but if a node has been edited, it should be given higher priority.
Comments
Comment #1
jhodgdonI seem to be doing things in 6.x and then porting to 7.x...
Comment #2
jhodgdonAs a note: we don't want to do this like the core search module, because other content on the page might have changed even if the node itself hasn't changed. So we still want to cycle though already-indexed content and refresh it periodically. We just want to make sure that if a node is updated, it is prioritized for refreshing (node and attachments, probably).
Comment #3
jhodgdonBasically, we need to define sbp_nodes_nodeapi($op='update'), similar to http://api.drupal.org/api/drupal/modules--search--search.module/function...
May also want to do something like this in sbp_attach if possible.
Comment #4
jhodgdonI just committed a fix for this to the Drupal 6 development branch. Needs port to Drupal 7.
Comment #5
bibo commentedI'm having troubles with the performance of this module. I don't really need to index any page more often than when it's created or updated. Currently the whole site indexing operation seems to be run during each cron run(?). See http://drupal.org/node/952076#comment-3695322
What will happen when using the module on very large sites - or often on smaller sites, like my case? So far executing the search cron takes about a minute with this module enabled, and slows the whole site down. With this module disabled, it takes only a second or two to run search indexing hooks.
Could there be an UI option to only index new and updated items, and not unchanged content? Or a timebased setting how often this is run? Is this case the correct place to request such an option?
Comment #6
jhodgdonYou just need to change the settings on the Search settings page, so that fewer pages are indexed per cron run.
The philosophy of Search by Page is that it periodically reindexes content, because it's meant to index everything put on the content section of the page by your theme, not just the bare node content.
Comment #7
jhodgdonAnyway, I've just ported this to Drupal 7 as well.
Comment #8
jhodgdonI just realized that SBP Users needs to do the same thing (Drupal 6 and 7 versions).
This would use hook_user() in D6 and hook_user_update() in D7.
The previous fixes took care of SBP Nodes and SBP Attach.
See also #976272: Option to only index changed content (or minimum time)
Comment #9
jhodgdonThe Users fix is now committed to Drupal 6.x version. I'm also about to commit to Drupal 7.x version (just running all the tests to make sure), and then I am going to make the 7.x first official release! Yippee!
Comment #10
jhodgdonI need to reopen this issue, because nodes should be marked for reindexing when comments are updated or added too. Just like the search_comment() function in the core search module in D6.
Comment #11
jhodgdonI just committed a fix for this in the D6 development branch. Needs port to D7.
Comment #12
jhodgdonComment #13
jhodgdonThis is now committed to the D7 development branch too.