28 lines
533 B
Plaintext
28 lines
533 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.indices.create({
|
|
index: "my-index-000001",
|
|
mappings: {
|
|
properties: {
|
|
session_data: {
|
|
type: "object",
|
|
enabled: false,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
console.log(response);
|
|
|
|
const response1 = await client.index({
|
|
index: "my-index-000001",
|
|
id: "session_1",
|
|
document: {
|
|
session_data: "foo bar",
|
|
},
|
|
});
|
|
console.log(response1);
|
|
----
|