On Mon, Sep 26, 2016 at 9:44 AM, Bram Van Dam <bram.van...@intix.eu> wrote:
> Howdy,
>
> I realize that this might be a strange question, so please bear with me
> here.
>
> I've been replacing my usage of the old Stats Component (stats=true,
> stats.field=foo, [stats.facet=bar]) with the new json.facet sugar. This
> has been a great improvement on all fronts.
>
> However, with the stats component I could calculate stats on a field
> *without* having to facet. The new json.facet API doesn't seem to
> support that in any way that I can see.

>From http://yonik.com/json-facet-api/
====================
Statistics are facets

Statistics are now fully integrated into faceting. Since we start off
with a single facet bucket with a domain defined by the main query and
filters, we can even ask for statistics for this top level bucket,
before breaking up into further buckets via faceting. Example:

json.facet={
  x : "avg(price)",           // the average of the price field will
appear under "x"
  y : "unique(manufacturer)"  // the number of unique manufacturers
will appear under "y"
}
====================

-Yonik

Reply via email to