Let's say I have dictionary application where people come and look up word definitions.
Im trying to visualize top N most popular words during some timeframe.
In SQL I would do it possibly like this:
SELECT word, count(*) as cnt FROM lookups GROUP BY word ORDER BY cnt DESC;
So I plan on dumping data into ES in this format for example:
{"timestamp":"2016-11-07T12:38:56-05:00","word":"dog","is_mwu":"no","host":"08a2cf4807fb","ref":"dictionary"}
{"timestamp":"2016-11-07T12:38:58-05:00","word":"red","is_mwu":"no","host":"08a2cf4807fb","ref":"dictionary"}
{"timestamp":"2016-11-07T12:39:29-05:00","word":"red","is_mwu":"no","host":"08a2cf4807fb","ref":"dictionary"}
{"timestamp":"2016-11-08T09:05:49-05:00","word":"dog","is_mwu":"no","host":"08a2cf4807fb","ref":"dictionary"}
Is aggregate query like that possible with ES?