Hi - i was sending the following value for json.facet:
json.facet=by_day:{type : range, start : NOW-30DAY/DAY, end : NOW/DAY, gap : 
"+1DAY", facet:{x : "avg(rank)"}}

I now also notice i didn't include the time field. But adding it gives the same 
error:
json.facet=by_day:{type : range, field : time, start : NOW-30DAY/DAY, end : 
NOW/DAY, gap : "+1DAY", facet:{x : "avg(rank)"}}

I must be missing something completely :)

Thanks,
Markus

 
 
-----Original message-----
> From:Yonik Seeley <ysee...@gmail.com>
> Sent: Thursday 11th February 2016 16:13
> To: solr-user@lucene.apache.org
> Subject: Re: Json faceting, aggregate numeric field by day?
> 
> On Thu, Feb 11, 2016 at 10:04 AM, Markus Jelsma
> <markus.jel...@openindex.io> wrote:
> > 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)
> >         ...
> 
> We don't have the best error reporting yet... can you show what you
> sent for json.facet?
> 
> > Is it supposed to work?
> 
> Yep, there are tests.  Here's an example of calculating percentiles
> per range facet bucket (at the bottom):
> http://yonik.com/percentiles-for-solr-faceting/
> 
> > I also found open issues SOLR-6348 and SOLR-6352 which made me doubt is wat 
> > supported at all.
> 
> Those issues aren't related to the new facet module... you can tell by
> the syntax.
> 
> -Yonik
> 

Reply via email to