And add &stats.facet=type - and then you would get a sum of price for each
type.
So,
?q=*:*&stats=true&stats.field=price&stats.facet=type
-- Jack Krupansky
-----Original Message-----
From: Markus Mirsberger
Sent: Thursday, December 13, 2012 11:41 PM
To: solr-user@lucene.apache.org
Subject: Re: solr faceting sum function
Sorry....stats.field=price
"cmd.ares" <cmd.a...@gmail.com> wrote:
lucene index structure:
product_name type price
-----------------------------------------------
iphone4s mobile 2000
iphone5 mobile 5000
S3 mobile 3000
intel i3 pc 1000
intel i5 pc 1500
------------------------------------------------
i want to use solr like sql:
select type,sum(price)s group by type
the resule will be like:
mobile 10000
pc 2500
how to do it with solr?
thanks
--
View this message in context:
http://lucene.472066.n3.nabble.com/solr-faceting-sum-function-tp4026921.html
Sent from the Solr - User mailing list archive at Nabble.com.