I want to make a visualization using Timelion.
I want to plot the count of documents only where a field is unique. In my case it is the user_id of the user.
How do I put the condition that some field should be unique in Timelion expression ?
I want to make a visualization using Timelion.
I want to plot the count of documents only where a field is unique. In my case it is the user_id of the user.
How do I put the condition that some field should be unique in Timelion expression ?
Hello,
You can use the Cardinality metric for this.
.es(*, metric='cardinality:user_id')
Thank you. It was helpful.
Can you please elaborate this cardinality thing ?
It's a term commonly used in SQL for counting the number of unique elements in a set.
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.