Hi Johannes, Yeah, I could make it world although it would nice if there was a way to plug in an aggregation function especially with this nice pivoting in 4.0. Do you know if there an easy way with the stats component to tell it to bring back only one of those values (ie. sum) back, kinda like the fl param?
Thanks for the tip. pt On Mon, Feb 6, 2012 at 10:04 PM, Johannes Goll <johannes.g...@gmail.com>wrote: > I meant > > stats=true&stats.field=price&stats.facet=category > > 2012/2/6 Johannes Goll <johannes.g...@gmail.com>: > > you can use the StatsComponent > > > > http://wiki.apache.org/solr/StatsComponent > > > > with stats=true&stats.price=category&stats.facet=category > > > > and pull the sum fields from the resulting stats facets. > > > > Johannes > > > > 2012/2/5 Paul Kapla <paul.ka...@gmail.com>: > >> Hi everyone, > >> I'm pretty new to solr and I'm not sure if this can even be done. Is > there > >> a way to sum a specific field per each item in a facet. For example, you > >> have an ecommerce site that has the following documents: > >> > >> id,category,name,price > >> 1,books,'solr book', $10.00 > >> 2,books,'lucene in action', $12.00 > >> 3.video, 'cool video', $20.00 > >> > >> so instead of getting (when faceting on category) > >> books(2) > >> video(1) > >> > >> I'd like to get: > >> books ($22) > >> video ($20) > >> > >> Is this something that can be even done? Any feedback would be much > >> appreciated. > > > > > > > > -- > > Dipl.-Ing.(FH) > > Johannes Goll > > 211 Curry Ford Lane > > Gaithersburg, Maryland 20878 > > USA > > > > -- > Dipl.-Ing.(FH) > Johannes Goll > 211 Curry Ford Lane > Gaithersburg, Maryland 20878 > USA >