Hi Andrea, It looks like you've stumbled on a bug in NestableJsonFacet. I clearly wasn't thinking about Date stats when I first wrote it; it looks like it doesn't detect/parse them correctly in the current iteration. I'll try to fix this in a subsequent release. But in the meantime, unfortunately your only option is to use the NamedList structures directly to retrieve the stat value.
Thanks for bringing it to our attention. Best, Jason On Fri, Mar 8, 2019 at 4:42 AM Andrea Gazzarini <a.gazzar...@sease.io> wrote: > > Good morning guys, I have a questions about Solrj and JSON facets. > > I'm using Solr 7.7.1 and I'm sending a request like this: > > json.facet={x:'max(iterationTimestamp)'} > > where "iterationTimestamp" is a solr.DatePointField. The JSON response > correctly includes what I'm expecting: > > "facets": { > "count": 8, > "x": "1973-09-20T17:33:18.700Z" > } > > but Solrj doesn't. Specifically, the jsonFacetingResponse contains only > the domainCount attribute (8). > Looking at the code I see that in NestableJsonFacet a stats is taken in > account only if the corresponding value is an instance of Number (and x > in the example above is a java.util.Date). > > Is that expected? Is there a way (other than dealing with nested > NamedLists) for retrieving that value? > > Cheers, > Andrea