On Wed, Feb 10, 2016 at 5:21 AM, Markus Jelsma <markus.jel...@openindex.io> wrote: > Hi - if we assume the following simple documents: > > <doc> > <date name="time">2015-01-01T00:00:00Z</date> > <int name="value">2</int> > </doc> > <doc> > <date name="time">2015-01-01T00:00:00Z</date> > <int name="value">4</int> > </doc> > <doc> > <date name="time">2015-01-02T00:00:00Z</date> > <int name="value">3</int> > </doc> > <doc> > <date name="time">2015-01-02T00:00:00Z</date> > <int name="value">7</int> > </doc> > > Can i get a daily average for the field 'value' by day? e.g. > > <lst name="value"> > <double name="2015-01-01T00:00:00Z">3.0</double> > <double name="2015-01-02T00:00:00Z">5.0</double> > </lst>
For the JSON Facet API, I guess this would be: json.facet= by_day : { type : range, start : ..., end : ..., gap : "+1DAY", facet : { x : "avg(value)" } } -Yonik