I want to modify the value of count in JSON Input like that
but it dosn't work,however,it work for other Metric Aggregation,sum, min and so on.
and I guess its not possible using Scripted Field for Unique Field.
It gives Internal Server Error
I want to modify the value of count in JSON Input like that
It gives Internal Server Error
There are examples of using a scripted value for the Cardinality function here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-cardinality-aggregation.html#_script_3
Specifically, you probably need to specify doc['_value']
as the field name in your script.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.