Added new docs examples (#1233)
This commit is contained in:
committed by
GitHub
parent
83e5147d9d
commit
148f2fd864
24
docs/doc_examples/6faf10a73f7d5fffbcb037bdb2cbaff8.asciidoc
Normal file
24
docs/doc_examples/6faf10a73f7d5fffbcb037bdb2cbaff8.asciidoc
Normal file
@ -0,0 +1,24 @@
|
||||
// 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',
|
||||
body: {
|
||||
aggs: {
|
||||
dayOfWeek: {
|
||||
terms: {
|
||||
script: {
|
||||
lang: 'painless',
|
||||
source: "doc['date'].value.dayOfWeekEnum.value"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(response)
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user