I am just now working with the 7.x version of this module, so please forgive me if I have somehow gotten things misconfigured. Since this is such a basic function, I really do wonder if the problem is somehow in my particular setup.

Symptom:

Nodes are not cued for indexing

Diagnosis/Guess:

While apachesolr.index.inc is referenced in the apachesolr.info file (files[] = apachesolr.index.inc), this feature appears to only cache classes or interfaces and not simple functions, so the default "apachesolr_index_node_status_callback" function referenced in apachesolr.index.inc is not loaded in the apachesolr_entity_update() hook. That is this:

 $status_callback = apachesolr_entity_get_callback($type, 'status callback');
    $status = 0;
    if (is_callable($status_callback)) { //i.e. apachesolr_index_node_status_callback
      $status = $status_callback($entity, $type);
    }

always fails for me and results in the status being set to zero, regardless of the node's actual status.

Adding module_load_include('inc', 'apachesolr', 'apachesolr.index') to the update function (as is done in the apachesolr_entity_delete() function) resolves the problem for me.

Comments

nick_vh’s picture

Just to confirm, because this problem depends on contrib and custom modules also, does this also happen with latest dev?
With my installation I don't seem to have any troubles with this problem? Also, if you can, please make a patch so we can apply this quickly and painlessly!

Nick

cfennell’s picture

Status: Active » Needs review
StatusFileSize
new531 bytes

Patch includes apachesolr.index.inc file.

cfennell’s picture

Yikes, what service, thanks for the quick response. I will try with the latest dev and report back.

cfennell’s picture

Hmm, same result with dev. I am going to do a full reinstall and selectively disable other contributed modules to see if one of them might be the offender...and will report back if I learn something.

cfennell’s picture

Status: Needs review » Closed (works as designed)

Reinstalling fixed the problem. Registry data or some such must have gotten corrupted. In any case, this is obviously not an apachesolr-specific problem, closing, works as designed.

Thanks again for the quick feedback.