You could do it... if you wrote your own ValueSource that went out and did
the sum of the named field for the selected documents end then you could use
it in a function query in the &fl field list.
-- Jack Krupansky
-----Original Message-----
From: cmd.ares
Sent: Thursday, December 13, 2012 11:21 PM
To: solr-user@lucene.apache.org
Subject: solr faceting sum function
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.