Look into using the value_script with the terms stats facet.
--
Ivan
On Mon, Oct 14, 2013 at 2:16 PM, didier.baquier@gmail.com wrote:
Hi folks,
I am wondering if it is possible, for any kind of facets, to define and
use a function instead of the count ?Quick example:
I have a term facet on a field which can be Paid or Unpaid, and I got the
number of hits.term: Paid
count: 12term: Unpaid
count: 10I also have another field "amount", and I am wondering if I can define a
function to say : for each match, add the amount to the sum.term: Paid
count: 120 (for an amount of 10)term: Unpaid
count: 100Thanks for your help
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.