The proposal would be to add

hook_apachesolr_exclude($env_id, $entity_id, $entity_) { }
hook_apachesolr_ENTITY_exclude($env_id, $entity_id, $entity_type) { }

This would allow for selectively skipping certain nodes for certain environments.

Comments

nick_vh’s picture

Priority: Normal » Critical

Critical because of the following :

The current version uses status callbacks, this has a consequence that it is removed from the indexing table. However, if you need to index to multiple environments you can't have it removed form the index table. So therefore we need to add another hook that "skips" the item rather than "sets the status to 0 and remove it"

nick_vh’s picture

StatusFileSize
new1.29 KB

First attempt to show what we're aiming at

pwolanin’s picture

Status: Active » Needs work

re:

+          $exclude = module_invoke($module, 'apachesolr_exclude', $row->entity_id, $env_id);

Let's try to be consistent and pass $env_id first to all hooks?

Also, I'm wondering if we should pass the whole $row instead of just entity ID?

nick_vh’s picture

Status: Needs work » Active
StatusFileSize
new3.55 KB

Added API docs + fixed typos in the first patch

nick_vh’s picture

StatusFileSize
new5.85 KB
nick_vh’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1536628-6.patch, failed testing.

nick_vh’s picture

StatusFileSize
new6.19 KB

Woops, bad variable. Corrected in this patch

nick_vh’s picture

Status: Needs work » Needs review
nick_vh’s picture

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

Committed to d7

nick_vh’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new6.58 KB
nick_vh’s picture

Status: Needs review » Closed (fixed)

Committed to D6