I want a sharded Solr environment so that I can distribute data and query accordingly. Started two solr instances as described here.
Since Solr doesn't support (fully yet) writing automatically into different Solr instances, I have to do it manually.
I'm trying to do it in the following hook:
/* "node" is the module name. */
function node_apachesolr_index_document_build($document, $entity, $entity_type, &$env_id)
{
}
Note that I'm trying to change the $env_id
by making it a reference parameter, since that's what I want to change based on certain logic. When the cron is run, I get the error:
Warning: Parameter 4 to node_apachesolr_index_document_build() expected to be a reference, value given in module_invoke_all() (line 857 of /var/www/drupal-7.17/includes/module.inc)
since it messes up with existing calls.
Any idea how to workaround this? Thanks.