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

[source, js]
----
const response = await client.indices.create({
  index: "my-index-000001",
  mappings: {
    enabled: false,
  },
});
console.log(response);

const response1 = await client.index({
  index: "my-index-000001",
  id: "session_1",
  document: {
    user_id: "kimchy",
    session_data: {
      arbitrary_object: {
        some_array: [
          "foo",
          "bar",
          {
            baz: 2,
          },
        ],
      },
    },
    last_updated: "2015-12-06T18:20:22",
  },
});
console.log(response1);

const response2 = await client.get({
  index: "my-index-000001",
  id: "session_1",
});
console.log(response2);

const response3 = await client.indices.getMapping({
  index: "my-index-000001",
});
console.log(response3);
----
