[source, ruby]
----
response = client.bulk(
  index: 'library',
  refresh: true,
  body: [
    {
      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
    }
  ]
)
puts response
----
