// 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: "sales",
  id: 1,
  refresh: "true",
  document: {
    tags: ["car", "auto"],
    comments: [
      {
        username: "baddriver007",
        comment: "This car could have better brakes",
      },
      {
        username: "dr_who",
        comment: "Where's the autopilot? Can't find it",
      },
      {
        username: "ilovemotorbikes",
        comment: "This car has two extra wheels",
      },
    ],
  },
});
console.log(response);
----
