On Wed, Feb 10, 2016 at 10: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>
>
> Reading the documentation, i don't think i can, or i am missing it 
> completely. But i just want to be sure.

Yes, you can facet by day, and use the stats component to calculate
the mean average. This blog post explains it:

https://lucidworks.com/blog/2015/01/29/you-got-stats-in-my-facets/

Cheers

Tom

Reply via email to