def get_source_with_id(result):
    """Return a document's `_source` field with its `_id` added.

    Parameters
    ----------
    result : dict
        A document from a set of Elasticsearch search results.

    Returns
    -------
    dict
        The document's `_source` field updated with the doc's `_id`.

    """
    result['_source'].update({'_id': result['_id']})
    return result['_source']