from typing import List


def _to_record(query_result) -> List:
    """Elasticsearch result to record
    """
    records = query_result['hits']['hits']

    return [r["_source"] for r in records] if records else []