Code snippet tested.
$storage = \Drupal::entityManager()->getStorage("node");
$query = \Drupal::entityQuery('node');
$query->condition("type", $bundle);
$result = $query->execute();
foreach ($result as $nid) {
$node = $storage->load($nid);
$node->changed = REQUEST_TIME;
$node->save();
}
how to batch update a computed field value for existed nodes? It works manually click save button on UI, but not work using code.