lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Goll <johannes.g...@gmail.com>
Subject Re: summing facets on a specific field
Date Tue, 07 Feb 2012 03:03:21 GMT
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.kapla@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

Mime
View raw message