Files
elasticsearch-js/docs/doc_examples/08c9af9dd519c011deedd406f3061836.asciidoc
github-actions[bot] b4eb8e5441 [Backport 8.15] Added/updated snippets for docs (#2319)
(cherry picked from commit f737290d10)

Co-authored-by: Josh Mock <joshua.mock@elastic.co>
2024-07-29 17:10:42 -05:00

47 lines
1.1 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.ml.previewDatafeed({
datafeed_config: {
indices: ["kibana_sample_data_ecommerce"],
query: {
bool: {
filter: [
{
term: {
_index: "kibana_sample_data_ecommerce",
},
},
],
},
},
scroll_size: 1000,
},
job_config: {
description: "Find customers spending an unusually high amount in an hour",
analysis_config: {
bucket_span: "1h",
detectors: [
{
detector_description: "High total sales",
function: "high_sum",
field_name: "taxful_total_price",
over_field_name: "customer_full_name.keyword",
},
],
influencers: ["customer_full_name.keyword", "category.keyword"],
},
analysis_limits: {
model_memory_limit: "10mb",
},
data_description: {
time_field: "order_date",
time_format: "epoch_ms",
},
},
});
console.log(response);
----