def GetFieldInDocument(document, field_name):
  for f in document.field_list():
    if f.name() == field_name:
      return f
  return None
Find and return the first field with the provided name in the document.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/search/search_util.py/GetFieldInDocument