// 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.search({
  index: "node_upgrade",
  size: 0,
  runtime_mappings: {
    "startup_time_before.adjusted": {
      type: "long",
      script: {
        source: "emit(doc['startup_time_before'].value - params.adjustment)",
        params: {
          adjustment: 10,
        },
      },
    },
  },
  aggs: {
    startup_time_ttest: {
      t_test: {
        a: {
          field: "startup_time_before.adjusted",
        },
        b: {
          field: "startup_time_after",
        },
        type: "paired",
      },
    },
  },
});
console.log(response);
----
