// 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.indices.createFrom({
  source: "my-index",
  dest: "my-new-index",
  create_from: {
    settings_override: {
      index: {
        number_of_shards: 5,
      },
    },
    mappings_override: {
      properties: {
        field2: {
          type: "boolean",
        },
      },
    },
  },
});
console.log(response);
----
