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

44 lines
843 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: "ct1",
template: {
settings: {
"index.number_of_shards": 2,
},
},
});
console.log(response);
const response1 = await client.cluster.putComponentTemplate({
name: "ct2",
template: {
settings: {
"index.number_of_replicas": 0,
},
mappings: {
properties: {
"@timestamp": {
type: "date",
},
},
},
},
});
console.log(response1);
const response2 = await client.indices.simulateTemplate({
index_patterns: ["my*"],
template: {
settings: {
"index.number_of_shards": 3,
},
},
composed_of: ["ct1", "ct2"],
});
console.log(response2);
----