internal virtual void BroadcastNodeReopen(int nodeID, long version, IndexSearcher newSearcher)
{
if (VERBOSE)
{
Console.WriteLine("REOPEN: nodeID=" + nodeID + " version=" + version + " maxDoc=" + newSearcher.IndexReader.MaxDoc);
}
// Broadcast new collection stats for this node to all
// other nodes:
foreach (string field in FieldsToShare)
{
CollectionStatistics stats = newSearcher.CollectionStatistics(field);
foreach (NodeState node in Nodes)
{
// Don't put my own collection stats into the cache;
// we pull locally:
if (node.MyNodeID != nodeID)
{
node.CollectionStatsCache[new FieldAndShardVersion(nodeID, version, field)] = stats;
}
}
}
foreach (NodeState node in Nodes)
{
node.UpdateNodeVersion(nodeID, version);
}
}