Help with aggregation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with aggregation

tomas.mozes
Hello,
suppose we have documents that only have a single entry (uid in form of a string like "12345678"). Now we can make an aggegation on terms to see how many of these occur. That is ok. And from that, we would like to know the distribution of counts of that uid

So the entries are:
... "uid": "1234"
... "uid": "5612"
... "uid": "1234"
... "uid": "9999"
... "uid": "5612"

if we make the aggregation we get:
"1234": 2
"5612": 2
"9999": 1

And the final step is that we would like numbers like:
2: 2 (there are 2 groups with count 2 - "1234" and "5612")
1: 1 (there is 1 group with count 1 - "9999")

How is that possible please?
Thank you!

Tomas

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a25ca9cb-54f9-47c1-ab02-0b17a95a89f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help with aggregation

krraghuram
This post has NOT been accepted by the mailing list yet.
Hi,

I have a similar problem. I need to get the distribution of counts.
Can anyone help?

Thanks,
Raghuram
Reply | Threaded
Open this post in threaded view
|

Re: Help with aggregation

rodrilima
This post has NOT been accepted by the mailing list yet.
I'm too