// 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.reindex({
  body: {
    source: {
      remote: {
        host: 'http://otherhost:9200',
        socket_timeout: '1m',
        connect_timeout: '10s'
      },
      index: 'source',
      query: {
        match: {
          test: 'data'
        }
      }
    },
    dest: {
      index: 'dest'
    }
  }
})
console.log(response)
----

