52 lines
1.1 KiB
Plaintext
52 lines
1.1 KiB
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.indices.create({
|
|
index: "my-index-000004",
|
|
mappings: {
|
|
properties: {
|
|
metrics: {
|
|
subobjects: "auto",
|
|
properties: {
|
|
time: {
|
|
type: "object",
|
|
properties: {
|
|
min: {
|
|
type: "long",
|
|
},
|
|
},
|
|
},
|
|
to: {
|
|
type: "object",
|
|
properties: {
|
|
inner_metrics: {
|
|
type: "object",
|
|
subobjects: "auto",
|
|
properties: {
|
|
time: {
|
|
type: "object",
|
|
properties: {
|
|
max: {
|
|
type: "long",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
console.log(response);
|
|
|
|
const response1 = await client.indices.getMapping({
|
|
index: "my-index-000004",
|
|
});
|
|
console.log(response1);
|
|
----
|