Auto-generated code for 8.x (#2412)
Co-authored-by: Josh Mock <joshua.mock@elastic.co>
This commit is contained in:
36
docs/doc_examples/fb0152f6c70f647a8b6709969113486d.asciidoc
Normal file
36
docs/doc_examples/fb0152f6c70f647a8b6709969113486d.asciidoc
Normal file
@ -0,0 +1,36 @@
|
||||
// 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: "idx",
|
||||
settings: {
|
||||
index: {
|
||||
mapping: {
|
||||
source: {
|
||||
mode: "synthetic",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
mappings: {
|
||||
properties: {
|
||||
kwd: {
|
||||
type: "keyword",
|
||||
store: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.index({
|
||||
index: "idx",
|
||||
id: 1,
|
||||
document: {
|
||||
kwd: ["foo", "foo", "bar", "baz"],
|
||||
},
|
||||
});
|
||||
console.log(response1);
|
||||
----
|
||||
Reference in New Issue
Block a user