Median of last top N hits in ElasticSearch -
given elasticsearch index objects like
{ "key": "string", "creation_date": "date", "metric":"number" } is possible calculate median of metric last n hits (ordered creation_date) of each day?
text steps of such query:
- group day using
creation_datefield - group
key - take last n items (ordered
creation_date) - calculate median between them
thanks!
Comments
Post a Comment