def store_by_id(obj_list):
    """returns a dict where the objects are stored by their object id"""
    result_dict = {}
    for obj in obj_list:
        obj_id = obj.get('_source', {}).get('id', False)
        if obj_id:
            result_dict[obj_id] = obj
    return result_dict