def parse_vespa_json(data):
    """
    Parse Vespa results to get necessary information.

    :param data: Vespa results in JSON format.
    :return: List with retrieved documents
    """
    ranking = []
    if "children" in data["root"]:
        ranking = [hit["fields"]["id"] for hit in data["root"]["children"] if "fields" in hit]
    return ranking