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 <[email protected]> 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:
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/a83cc20d-8c9c-4a6b-b843-349a2669e580%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/a83cc20d-8c9c-4a6b-b843-349a2669e580%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [email protected].
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 via email to