Files
elasticsearch-js/docs/doc_examples/cd38c601ab293a6ec0e2df71d0c96b58.asciidoc
2024-07-29 17:10:05 -05:00

33 lines
750 B
Plaintext

// 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.cluster.putComponentTemplate({
name: "template_with_2_shards",
template: {
settings: {
"index.number_of_shards": 2,
},
},
});
console.log(response);
const response1 = await client.cluster.putComponentTemplate({
name: "template_with_3_shards",
template: {
settings: {
"index.number_of_shards": 3,
},
},
});
console.log(response1);
const response2 = await client.indices.putIndexTemplate({
name: "template_1",
index_patterns: ["t*"],
composed_of: ["template_with_2_shards", "template_with_3_shards"],
});
console.log(response2);
----