def _serialize_node_search(node):
 data = {'id': node._id, 'title': node.title, 'etal': (len(node.visible_contributors) > 1), 'isRegistration': node.is_registration}
 if node.is_registration:
  data['title'] += ' (registration)'
  data['dateRegistered'] = node.registered_date.isoformat()
 else:
  data['dateCreated'] = node.date_created.isoformat()
  data['dateModified'] = node.date_modified.isoformat()
 first_author = node.visible_contributors[0]
 data['firstAuthor'] = (first_author.family_name or first_author.given_name or first_author.fullname)
 return data

def _serialize_node_search ( node ) : data = { 'id' : node . _id , 'title' : node . title , 'etal' : ( len ( node . visible_contributors ) > 1 ) , 'isRegistration' : node . is_registration } if node . is_registration : data [ 'title' ] += ' (registration)' data [ 'dateRegistered' ] = node . registered_date . isoformat ( ) else : data [ 'dateCreated' ] = node . date_created . isoformat ( ) data [ 'dateModified' ] = node . date_modified . isoformat ( ) first_author = node . visible_contributors [ 0 ] data [ 'firstAuthor' ] = ( first_author . family_name or first_author . given_name or first_author . fullname ) return data
serialize a node for use in pointer search .