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

[source, js]
----
const response0 = await client.index({
  index: 'drivers',
  id: '1',
  body: {
    driver: {
      last_name: 'McQueen',
      vehicle: [
        {
          make: 'Powell Motors',
          model: 'Canyonero'
        },
        {
          make: 'Miller-Meteor',
          model: 'Ecto-1'
        }
      ]
    }
  }
})
console.log(response0)

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

