"transform": {
"script": {
"source": "return [ 'dups': ctx.payload.aggregations.my_buckets.buckets.stream().filter(t -> { return t.doc_count > 1 }).map(t -> { return ['key': t.key ] }).collect(Collectors.toList()) ]",
"lang": "painless"
}
}
Created
March 4, 2020 06:45
-
-
Save renshuki/5aaa48b9d5f312bc74474abd05c412cb to your computer and use it in GitHub Desktop.
Elasticsearch / Watcher - Transform script to extract duplicates (doc_count > 1)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment