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

87 lines
1.8 KiB
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: "correlate_latency",
size: 0,
filter_path: "aggregations",
aggs: {
buckets: {
terms: {
field: "version",
size: 2,
},
aggs: {
latency_ranges: {
range: {
field: "latency",
ranges: [
{
to: 0,
},
{
from: 0,
to: 105,
},
{
from: 105,
to: 225,
},
{
from: 225,
to: 445,
},
{
from: 445,
to: 665,
},
{
from: 665,
to: 885,
},
{
from: 885,
to: 1115,
},
{
from: 1115,
to: 1335,
},
{
from: 1335,
to: 1555,
},
{
from: 1555,
to: 1775,
},
{
from: 1775,
},
],
},
},
bucket_correlation: {
bucket_correlation: {
buckets_path: "latency_ranges>_count",
function: {
count_correlation: {
indicator: {
expectations: [
0, 52.5, 165, 335, 555, 775, 1000, 1225, 1445, 1665, 1775,
],
doc_count: 200,
},
},
},
},
},
},
},
},
});
console.log(response);
----