lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Lin Edwin Yeo <edwinye...@gmail.com>
Subject Sum of all values in Function Query
Date Wed, 03 Aug 2016 03:58:47 GMT
Hi,

Would like to find out, is it possible for Solr to find a sum of all the
values that are returned in a query?

For example, when I does a search in which that is a field called "Amount"
with fieldType=float.
Is it possible for Solr to do return the sum of all the "Amount" that are
returned? If the main search query is *:*, then it should return the sum of
all the "Amount" that are present in the entire collection.

i have tried to use sum(Amount), but this doesn't work, as I believe what
the sum does is to just do the sum of the static amount in each of the
individual record, and not the entire search field records.

I'm using Solr 6.1.0

Regards,
Edwin

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message