// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.mjs` to generate the docs examples

[source, js]
----
const response = await client.index({
  index: "stats-index",
  id: 1,
  document: {
    agg_metric: {
      min: -302.5,
      max: 702.3,
      sum: 200,
      value_count: 25,
    },
  },
});
console.log(response);

const response1 = await client.index({
  index: "stats-index",
  id: 2,
  document: {
    agg_metric: {
      min: -93,
      max: 1702.3,
      sum: 300,
      value_count: 25,
    },
  },
});
console.log(response1);
----
