// 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: "shapes",
  mappings: {
    properties: {
      location: {
        type: "geo_shape",
      },
    },
  },
});
console.log(response);

const response1 = await client.index({
  index: "shapes",
  id: "deu",
  document: {
    location: {
      type: "envelope",
      coordinates: [
        [13, 53],
        [14, 52],
      ],
    },
  },
});
console.log(response1);

const response2 = await client.search({
  index: "example",
  query: {
    bool: {
      filter: {
        geo_shape: {
          location: {
            indexed_shape: {
              index: "shapes",
              id: "deu",
              path: "location",
            },
          },
        },
      },
    },
  },
});
console.log(response2);
----
