Added/updated snippets for docs (#2318)
This commit is contained in:
25
docs/doc_examples/1e4b17b830ead15087ccd96151a5ebde.asciidoc
Normal file
25
docs/doc_examples/1e4b17b830ead15087ccd96151a5ebde.asciidoc
Normal file
@ -0,0 +1,25 @@
|
||||
// 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.search({
|
||||
index: "my-index-000001",
|
||||
size: 0,
|
||||
runtime_mappings: {
|
||||
message_and_context: {
|
||||
type: "keyword",
|
||||
script:
|
||||
"\n emit(doc['message.keyword'].value + ' ' + doc['context.keyword'].value)\n ",
|
||||
},
|
||||
},
|
||||
aggs: {
|
||||
message_stats: {
|
||||
string_stats: {
|
||||
field: "message_and_context",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
Reference in New Issue
Block a user