Drupal 5.16 site setup without the comment module enabled so there are no records in the node_comment_statistics table. The query to get the nodes to index not ordering properly and as such is messing up the indexing.

The attached patch fixes that issue by using the column alias in the order by instead of another GREATER() function that was different then the column version.

Also added a check that the node_load() actually loads the node as the joins within the node_load are different than the index select so there are cases where the nid can exist in the index select and not load.

Comments

gpk’s picture

Seems this problem has been around for a while but has somehow escaped being fixed. #139537: search indexing gets stuck: node_update_index() - if comment.module is disabled has most of the debate but possibly doesn't consider everything touched on in the above post and patch.

tr’s picture

Status: Needs review » Closed (won't fix)

The original issue was fixed in 6.x by #139537: search indexing gets stuck: node_update_index() - if comment.module is disabled. As 5.x is no longer supported, so I'm marking this as a won't fix.