Grouping by non-numeric field


(jason) #1

Shay,

For some reason I am not able to post any messages on elasticsearch
group. Could you please post the message below?
Thank you!

Eugene.

Hi,

I would like to write a query in ES that shows counts for each
person's name, equivalent to the following SQL query:

select name, count() from people group by name;

I found a similar request here: https://github.com/elasticsearch/elasticsearch/issues/#issue/539

Does this feature already exist in the most recent version of ES? If
yes, which facet should I use? I looked at terms and histogram facets,
and they don't seem to be appropriate.

If anyone has implemented this before, please share your knowledge.

Thank you,
Eugene.


(Shay Banon) #2

You are spamming, you now send me mails several times?
On Wednesday, March 16, 2011 at 9:59 PM, eugene wrote:

Shay,

For some reason I am not able to post any messages on elasticsearch
group. Could you please post the message below?
Thank you!

Eugene.

Hi,

I would like to write a query in ES that shows counts for each
person's name, equivalent to the following SQL query:

select name, count() from people group by name;

I found a similar request here: https://github.com/elasticsearch/elasticsearch/issues/#issue/539

Does this feature already exist in the most recent version of ES? If
yes, which facet should I use? I looked at terms and histogram facets,
and they don't seem to be appropriate.

If anyone has implemented this before, please share your knowledge.

Thank you,
Eugene.


(system) #3