Files
elasticsearch-js/docs/doc_examples/b09f155602f9b2a6c40fe7c4a5436b7a.asciidoc
2024-09-30 13:41:23 -05:00

33 lines
678 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({
runtime_mappings: {
day_of_week: {
type: "keyword",
script:
"\n emit(doc['timestamp'].value.dayOfWeekEnum\n .getDisplayName(TextStyle.FULL, Locale.ENGLISH))\n ",
},
},
size: 0,
aggs: {
my_buckets: {
composite: {
sources: [
{
dow: {
terms: {
field: "day_of_week",
},
},
},
],
},
},
},
});
console.log(response);
----