def _get_alias_type(attribute_type):
    """
    Maps `dtype` to ES alias type.
    """
    dtype = attribute_type["dtype"]
    if dtype == "bool":
        return "boolean"
    if dtype == "int":
        return "long"
    if dtype == "float":
        return "double"
    if dtype == "enum":
        return "keyword"
    if dtype == "string":
        return "text" if "long_string" in attribute_type.get("style", "") else "keyword"
    if dtype == "datetime":
        return "date"
    if dtype == "geopos":
        return "geo_point"