-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Hi Thanks for your work on this plugin.
It is possible to count only unique values of certain term?
The use case its that I store all activity of the users, but if I use this at it is will count activity in total (per document) instead of per user (count active users for example)
A example dataset could be this
{"index": {"_index": "my-index", "_type": "doc"}}
{"timestamp": 1525000000000, "createdAt": 1525000000000, "daysBetween": 0, "userId": 1}
{"index": {"_index": "my-index", "_type": "doc"}}
{"timestamp": 1525000000000, "createdAt": 1525000000000, "daysBetween": 0, "userId": 1}
{"index": {"_index": "my-index", "_type": "doc"}}
{"timestamp": 1525000000000, "createdAt": 1525000000000, "daysBetween": 0, "userId": 2}
{"index": {"_index": "my-index", "_type": "doc"}}
{"timestamp": 1525000000000, "createdAt": 1525000000000, "daysBetween": 0, "userId": 1}
{"index": {"_index": "my-index", "_type": "doc"}}
{"timestamp": 1525086400000, "createdAt": 1525000000000, "daysBetween": 1, "userId": 1}
{"index": {"_index": "my-index", "_type": "doc"}}
{"timestamp": 1525086400000, "createdAt": 1525000000000, "daysBetween": 1, "userId": 2}
{"index": {"_index": "my-index", "_type": "doc"}}
{"timestamp": 1525086400000, "createdAt": 1525000000000, "daysBetween": 1, "userId": 2}
{"index": {"_index": "my-index", "_type": "doc"}}
{"timestamp": 1525172800000, "createdAt": 1525000000000, "daysBetween": 2, "userId": 1}
{"index": {"_index": "my-index", "_type": "doc"}}
{"timestamp": 1525172800000, "createdAt": 1525000000000, "daysBetween": 2, "userId": 1}
{"index": {"_index": "my-index", "_type": "doc"}}
{"timestamp": 1525259200000, "createdAt": 1525000000000, "daysBetween": 3, "userId": 2}
With this dataset I get this
But I wanted something like
| total | date | 0 | 1 | 2 | 3 |
|---|---|---|---|---|---|
| 6 | 2018/04/29 | 2 | 2 | 1 | 1 |
Thanks
bLuka and enVolt
Metadata
Metadata
Assignees
Labels
No labels
