Skip to content

Commit

Permalink
[DOCS] Fix transform painless example syntax (#88364)
Browse files Browse the repository at this point in the history
Corrects the syntax of an example for a scripted metric aggregation.
  • Loading branch information
eltomello authored Jul 21, 2022
1 parent e6fbb30 commit df7ea6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/reference/transform/painless-examples.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down Expand Up @@ -644,4 +644,4 @@ The API call results in a similar response:
}
...
--------------------------------------------------
// NOTCONSOLE
// NOTCONSOLE

0 comments on commit df7ea6a

Please sign in to comment.