[source, ruby]
----
response = client.reindex(
  body: {
    source: {
      remote: {
        host: 'http://otherhost:9200',
        username: 'user',
        password: 'pass'
      },
      index: 'my-index-000001',
      query: {
        match: {
          test: 'data'
        }
      }
    },
    dest: {
      index: 'my-new-index-000001'
    }
  }
)
puts response
----
