Files
elasticsearch-js/docs/doc_examples/aee26dd62fbb6d614a0798f3344c0598.asciidoc
2024-07-29 17:10:05 -05:00

40 lines
778 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.search({
index: "issues",
query: {
match_all: {},
},
aggs: {
comments: {
nested: {
path: "comments",
},
aggs: {
top_usernames: {
terms: {
field: "comments.username",
},
aggs: {
comment_to_issue: {
reverse_nested: {},
aggs: {
top_tags_per_comment: {
terms: {
field: "tags",
},
},
},
},
},
},
},
},
},
});
console.log(response);
----