// This file is autogenerated, DO NOT EDIT
// mapping/types/alias.asciidoc:12

[source, python]
----
resp = client.indices.create(
    index="trips",
    mappings={
        "properties": {
            "distance": {
                "type": "long"
            },
            "route_length_miles": {
                "type": "alias",
                "path": "distance"
            },
            "transit_mode": {
                "type": "keyword"
            }
        }
    },
)
print(resp)

resp1 = client.search(
    query={
        "range": {
            "route_length_miles": {
                "gte": 39
            }
        }
    },
)
print(resp1)
----
