Thanks. But this yields an error in FacetModule:

java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
        at 
org.apache.solr.search.facet.FacetModule.prepare(FacetModule.java:100)
        at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:247)
        at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:2073)
        ...

Is it supposed to work? I also found open issues SOLR-6348 and SOLR-6352 which 
made me doubt is wat supported at all.

Thanks,
Markus

[1]: https://issues.apache.org/jira/browse/SOLR-6348
[2]: https://issues.apache.org/jira/browse/SOLR-6352
 
 
-----Original message-----
> From:Yonik Seeley <ysee...@gmail.com>
> Sent: Thursday 11th February 2016 15:11
> To: solr-user@lucene.apache.org
> Subject: Re: Json faceting, aggregate numeric field by day?
> 
> 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
> 

Reply via email to