Added/updated snippets for docs (#2318)
This commit is contained in:
27
docs/doc_examples/92035a2a62d01a511662af65606d5fc6.asciidoc
Normal file
27
docs/doc_examples/92035a2a62d01a511662af65606d5fc6.asciidoc
Normal file
@ -0,0 +1,27 @@
|
||||
// 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: "sales",
|
||||
size: 0,
|
||||
aggs: {
|
||||
sales_per_month: {
|
||||
date_histogram: {
|
||||
field: "date",
|
||||
calendar_interval: "month",
|
||||
},
|
||||
aggs: {
|
||||
bucket_truncate: {
|
||||
bucket_sort: {
|
||||
from: 1,
|
||||
size: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
Reference in New Issue
Block a user