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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | apachesolr-include_index_file-1424866.patch | 531 bytes | cfennell |
Comments
Comment #1
nick_vhJust 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
Comment #2
cfennell commentedPatch includes apachesolr.index.inc file.
Comment #3
cfennell commentedYikes, what service, thanks for the quick response. I will try with the latest dev and report back.
Comment #4
cfennell commentedHmm, 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.
Comment #5
cfennell commentedReinstalling 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.