// 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.index({
  index: "drivers",
  id: 1,
  document: {
    driver: {
      last_name: "McQueen",
      vehicle: [
        {
          make: "Powell Motors",
          model: "Canyonero",
        },
        {
          make: "Miller-Meteor",
          model: "Ecto-1",
        },
      ],
    },
  },
});
console.log(response);

const response1 = await client.index({
  index: "drivers",
  id: 2,
  refresh: "true",
  document: {
    driver: {
      last_name: "Hudson",
      vehicle: [
        {
          make: "Mifune",
          model: "Mach Five",
        },
        {
          make: "Miller-Meteor",
          model: "Ecto-1",
        },
      ],
    },
  },
});
console.log(response1);
----
