Added/updated snippets for docs (#2318)
This commit is contained in:
34
docs/doc_examples/d5132d34ae922fa8e898889b627a1405.asciidoc
Normal file
34
docs/doc_examples/d5132d34ae922fa8e898889b627a1405.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.search({
|
||||
index: "child_example",
|
||||
size: 0,
|
||||
aggs: {
|
||||
"top-tags": {
|
||||
terms: {
|
||||
field: "tags.keyword",
|
||||
size: 10,
|
||||
},
|
||||
aggs: {
|
||||
"to-answers": {
|
||||
children: {
|
||||
type: "answer",
|
||||
},
|
||||
aggs: {
|
||||
"top-names": {
|
||||
terms: {
|
||||
field: "owner.display_name.keyword",
|
||||
size: 10,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
Reference in New Issue
Block a user