// 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.putSettings({
  settings: {
    "index.max_result_window": 5000,
  },
});
console.log(response);

const response1 = await client.cluster.putSettings({
  persistent: {
    "search.max_buckets": 20000,
    "search.allow_expensive_queries": false,
  },
});
console.log(response1);
----
