[DOCS] Fix transform painless example syntax (#88364)

Corrects the syntax of an example for a scripted metric aggregation.
This commit is contained in:
eltomello 2022-07-21 17:05:17 +02:00 committed by GitHub
parent e6fbb30bd2
commit df7ea6afcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -573,7 +573,7 @@ POST _transform/_preview
all_docs.add(span); 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 size = all_docs.size();
def min_time = all_docs[0]['@timestamp']; def min_time = all_docs[0]['@timestamp'];
def max_time = all_docs[size-1]['@timestamp']; def max_time = all_docs[size-1]['@timestamp'];
@ -644,4 +644,4 @@ The API call results in a similar response:
} }
... ...
-------------------------------------------------- --------------------------------------------------
// NOTCONSOLE // NOTCONSOLE