lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <>
Subject Re: solr faceting sum function
Date Fri, 14 Dec 2012 04:35:16 GMT
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
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?

View this message in context:
Sent from the Solr - User mailing list archive at 

View raw message