// 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.putMapping({
  index: "my-index-000001",
  runtime: {
    voltage_corrected: {
      type: "double",
      script: {
        source:
          "\n        emit(doc['voltage'].value * params['multiplier'])\n        ",
        params: {
          multiplier: 2,
        },
      },
    },
  },
});
console.log(response);
----
