def get_searchable_attributes(attributes, cads, content):
  """Get all searchable attributes for a given object that should be indexed

  Args:
    attributes: Attributes that should be extracted from some model
    cads: list of CAD instances
    content: dictionary (JSON) representation of an object
  Return:
    Dict of "key": "value" from objects revision
  """
  searchable_values = {}
  for attr in attributes:
    value = attr.get_attribute_revisioned_value(content)
    searchable_values[attr.alias] = value

  cav_dict = {v["custom_attribute_id"]: v
              for v in content.get("custom_attribute_values", [])}
  for cad in cads:
    cav = cav_dict.get(cad.id)
    if not cav:
      value = cad.get_indexed_value(cad.default_value)
    elif cad.attribute_type == "Map:Person":
      value = cav.get("attribute_object")
    else:
      value = cad.get_indexed_value(cav["attribute_value"])
    searchable_values[cad.title] = value
  return searchable_values