Added/updated snippets for docs (#2318)
This commit is contained in:
34
docs/doc_examples/c208de54369379e8d78ab201be18b6be.asciidoc
Normal file
34
docs/doc_examples/c208de54369379e8d78ab201be18b6be.asciidoc
Normal file
@ -0,0 +1,34 @@
|
||||
// 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: {
|
||||
dynamic_templates: [
|
||||
{
|
||||
longs_as_strings: {
|
||||
match_mapping_type: "string",
|
||||
match: "long_*",
|
||||
unmatch: "*_text",
|
||||
mapping: {
|
||||
type: "long",
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
const response1 = await client.index({
|
||||
index: "my-index-000001",
|
||||
id: 1,
|
||||
document: {
|
||||
long_num: "5",
|
||||
long_text: "foo",
|
||||
},
|
||||
});
|
||||
console.log(response1);
|
||||
----
|
||||
Reference in New Issue
Block a user