How do i change the apachesolr index environment based on node values? I have two apachesolr environment setup in my drupal instance. I want to index some nodes to one environment and some to the other, say based on some node values. 

I could see that it always indexes to default the environment. I could see the possibility of indexing in two environments, but it is irrespective of the nodes value.

How can i achieve it?

UPDATE:

To give more detail, I am trying to achieve shards in apache solr in Drupal 

UPDATE - 17 DEC 2012

Modules used: 


Apache solr Module and not search api/search api solr


Reason on why i need node values


I have a large nodes of a particular entity type, This makes my index so large.


So Decided to go with shards with multiple indexes of the same node type.

So based on the node size and its priority of the node or proximity of the nodes location or users location , I want to split up the index to separate cloud servers and index them. 
Proximity of the node also gives me power of separate out search indexes at a later stage.
I do not know if it is possible to shard Drupal nodes into different Solr indexes based on arbitrary field values, I do however know it is possible at a node type level.

From the API documentation:

/**
 * This is invoked for each entity that is being inspected to be added to the
 * index. if any module returns TRUE, the entity is skipped for indexing.
 *
 * @param integer $entity_id
 * @param string $entity_type
 * @param integer $row
 *   A complete set of data from the indexing table.
 * @param string $env_id
 * @return boolean
 */
function hook_apachesolr_exclude($entity_id, $entity_type, $row, $env_id) {
  // Never index media entities to core_1.
  if ($entity_type == 'media' &amp;&amp; $env_id == 'core_1') {
    return TRUE;
  }
  // Never index news entities to core_2.
  if ($entity_type == 'news' &amp;&amp; $env_id == 'core_2') {
    return TRUE;
  }
  // Default to allow.
  return FALSE;
}


So all you would need to do is allow some node types to be indexed by one core, and allow some other node types to be indexed by another core.