def bulk_update_nodes(serialize, nodes, index=None):
 index = (index or INDEX)
 actions = []
 for node in nodes:
  serialized = serialize(node)
  if serialized:
   actions.append({'_op_type': 'update', '_index': index, '_id': node._id, '_type': get_doctype_from_node(node), 'doc': serialized, 'doc_as_upsert': True})
 if actions:
  return helpers.bulk(client(), actions)

def bulk_update_nodes ( serialize , nodes , index = None ) : index = ( index or INDEX ) actions = [ ] for node in nodes : serialized = serialize ( node ) if serialized : actions . append ( { '_op_type' : 'update' , '_index' : index , '_id' : node . _id , '_type' : get_doctype_from_node ( node ) , 'doc' : serialized , 'doc_as_upsert' : True } ) if actions : return helpers . bulk ( client ( ) , actions )
updates the list of input projects .