Added/updated snippets for docs (#2318)
This commit is contained in:
27
docs/doc_examples/c464ed2001d66a1446f37659dc9efc2a.asciidoc
Normal file
27
docs/doc_examples/c464ed2001d66a1446f37659dc9efc2a.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: {
|
||||
range: {
|
||||
date_range: {
|
||||
field: "date",
|
||||
format: "MM-yyyy",
|
||||
ranges: [
|
||||
{
|
||||
to: "now-10M/M",
|
||||
},
|
||||
{
|
||||
from: "now-10M/M",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(response);
|
||||
----
|
||||
Reference in New Issue
Block a user