Aggregations across values returned by term then date histogram

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

Aggregations across values returned by term then date histogram

ppearcy
I haven't been able to figure out how to do this and it may not be possible, but figured I'd ask. 

I have a query with multiple aggregations that looks like this:
https://gist.github.com/ppearcy/0c6a86ebf32a0bbcb1fc

This returns a time series of data per user: 
https://gist.github.com/ppearcy/7ceac858da2e647ff341

I want to do a stats aggregation across all the values for each week to provided per weekly statistical view of things. 

Currently, I am doing these computations client side and it works pretty well, but have performance concerns around merging lots of time series streams. 

Any help or ideas would be much appreciated. 

Thanks!
Paul

--
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/a83cc20d-8c9c-4a6b-b843-349a2669e580%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Aggregations across values returned by term then date histogram

vineeth mohan-2
Hello , 

I didn't get your question completely , but then i feel a simple date histogram query should do the trick.

  "aggs" : {
"{{time_interval}}": {
"date_histogram": {
"field": "time",
"interval": "{{time_interval}}",
"min_doc_count": 0
}
}
}

Let me know if this doesn't fit your need and if so , what other data you are looking for .

Thanks
Vineeth


On Thu, Sep 11, 2014 at 11:38 PM, ppearcy <[hidden email]> wrote:
I haven't been able to figure out how to do this and it may not be possible, but figured I'd ask. 

I have a query with multiple aggregations that looks like this:

This returns a time series of data per user: 

I want to do a stats aggregation across all the values for each week to provided per weekly statistical view of things. 

Currently, I am doing these computations client side and it works pretty well, but have performance concerns around merging lots of time series streams. 

Any help or ideas would be much appreciated. 

Thanks!
Paul

--
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/a83cc20d-8c9c-4a6b-b843-349a2669e580%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAGdPd5nZXHThM-odXc96kLmFTUa869qJkodQZpd%2Bw7NTWhJMeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Aggregations across values returned by term then date histogram

ppearcy
Hi,
  I am doing a terms aggregation on user with a sub date histogram aggregation to get time series per user. I then want to perform a stats aggregation all the values of each date bucket across users. 

Thanks,
Paul

On Thursday, September 11, 2014 8:32:13 PM UTC-4, vineeth mohan wrote:
Hello , 

I didn't get your question completely , but then i feel a simple date histogram query should do the trick.

  "aggs" : {
"{{time_interval}}": {
"date_histogram": {
"field": "time",
"interval": "{{time_interval}}",
"min_doc_count": 0
}
}
}

Let me know if this doesn't fit your need and if so , what other data you are looking for .

Thanks
Vineeth


On Thu, Sep 11, 2014 at 11:38 PM, ppearcy <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="-f7coMYTYQ4J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ppe...@...> wrote:
I haven't been able to figure out how to do this and it may not be possible, but figured I'd ask. 

I have a query with multiple aggregations that looks like this:
<a href="https://gist.github.com/ppearcy/0c6a86ebf32a0bbcb1fc" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fppearcy%2F0c6a86ebf32a0bbcb1fc\46sa\75D\46sntz\0751\46usg\75AFQjCNGeoDfhzkkegNzJ2-80E7HEsCOUng';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fppearcy%2F0c6a86ebf32a0bbcb1fc\46sa\75D\46sntz\0751\46usg\75AFQjCNGeoDfhzkkegNzJ2-80E7HEsCOUng';return true;">https://gist.github.com/ppearcy/0c6a86ebf32a0bbcb1fc

This returns a time series of data per user: 
<a href="https://gist.github.com/ppearcy/7ceac858da2e647ff341" target="_blank" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fppearcy%2F7ceac858da2e647ff341\46sa\75D\46sntz\0751\46usg\75AFQjCNHYehmNjQ5mLJ3JXNo9i01X8hKlCA';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgist.github.com%2Fppearcy%2F7ceac858da2e647ff341\46sa\75D\46sntz\0751\46usg\75AFQjCNHYehmNjQ5mLJ3JXNo9i01X8hKlCA';return true;">https://gist.github.com/ppearcy/7ceac858da2e647ff341

I want to do a stats aggregation across all the values for each week to provided per weekly statistical view of things. 

Currently, I am doing these computations client side and it works pretty well, but have performance concerns around merging lots of time series streams. 

Any help or ideas would be much appreciated. 

Thanks!
Paul

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="-f7coMYTYQ4J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/elasticsearch/a83cc20d-8c9c-4a6b-b843-349a2669e580%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/a83cc20d-8c9c-4a6b-b843-349a2669e580%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/a83cc20d-8c9c-4a6b-b843-349a2669e580%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/msgid/elasticsearch/a83cc20d-8c9c-4a6b-b843-349a2669e580%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
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/3b0a967b-8445-4401-82fe-ee22c942d050%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.