// 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.bulk({
  index: "library",
  refresh: "true",
  operations: [
    {
      index: {
        _id: "Leviathan Wakes",
      },
    },
    {
      name: "Leviathan Wakes",
      author: "James S.A. Corey",
      release_date: "2011-06-02",
      page_count: 561,
    },
    {
      index: {
        _id: "Hyperion",
      },
    },
    {
      name: "Hyperion",
      author: "Dan Simmons",
      release_date: "1989-05-26",
      page_count: 482,
    },
    {
      index: {
        _id: "Dune",
      },
    },
    {
      name: "Dune",
      author: "Frank Herbert",
      release_date: "1965-06-01",
      page_count: 604,
    },
  ],
});
console.log(response);
----
