// 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.indices.stats({
  metric: "fielddata",
  human: "true",
  fields: "my_join_field",
});
console.log(response);

const response1 = await client.nodes.stats({
  metric: "indices",
  index_metric: "fielddata",
  human: "true",
  fields: "my_join_field",
});
console.log(response1);
----
