mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
[DOCS] Fix transform painless example syntax (#88364)
Corrects the syntax of an example for a scripted metric aggregation.
This commit is contained in:
parent
e6fbb30bd2
commit
df7ea6afcd
1 changed files with 2 additions and 2 deletions
|
@ -573,7 +573,7 @@ POST _transform/_preview
|
|||
all_docs.add(span);
|
||||
}
|
||||
}
|
||||
all_docs.sort((HashMap o1, HashMap o2)->o1['@timestamp'].toEpochMilli()compareTo(o2['@timestamp']-toEpochMilli()));
|
||||
all_docs.sort((HashMap o1, HashMap o2)->o1['@timestamp'].toEpochMilli().compareTo(o2['@timestamp'].toEpochMilli()));
|
||||
def size = all_docs.size();
|
||||
def min_time = all_docs[0]['@timestamp'];
|
||||
def max_time = all_docs[size-1]['@timestamp'];
|
||||
|
@ -644,4 +644,4 @@ The API call results in a similar response:
|
|||
}
|
||||
...
|
||||
--------------------------------------------------
|
||||
// NOTCONSOLE
|
||||
// NOTCONSOLE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue