// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.mjs` to generate the docs examples

[source, js]
----
const response = await client.indices.create({
  index: "trips",
  mappings: {
    properties: {
      distance: {
        type: "long",
      },
      route_length_miles: {
        type: "alias",
        path: "distance",
      },
      transit_mode: {
        type: "keyword",
      },
    },
  },
});
console.log(response);

const response1 = await client.search({
  query: {
    range: {
      route_length_miles: {
        gte: 39,
      },
    },
  },
});
console.log(response1);
----
