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

jhodgdon’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev

I seem to be doing things in 6.x and then porting to 7.x...

jhodgdon’s picture

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

jhodgdon’s picture

Basically, 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.

jhodgdon’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Patch (to be ported)

I just committed a fix for this to the Drupal 6 development branch. Needs port to Drupal 7.

bibo’s picture

I'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?

jhodgdon’s picture

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

jhodgdon’s picture

Status: Patch (to be ported) » Fixed

Anyway, I've just ported this to Drupal 7 as well.

jhodgdon’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Component: Search by Page Nodes module » Search by Page Users module
Status: Fixed » Active

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

jhodgdon’s picture

Status: Active » Fixed

The 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!

jhodgdon’s picture

Status: Fixed » Active

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

jhodgdon’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

I just committed a fix for this in the D6 development branch. Needs port to D7.

jhodgdon’s picture

Status: Active » Patch (to be ported)
jhodgdon’s picture

Status: Patch (to be ported) » Fixed

This is now committed to the D7 development branch too.

Status: Fixed » Closed (fixed)

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