Aggregating subscores for each field and displaying subscores

(nicolas) #1


I have K numerical fields

  1. Currently for each field I have a script score computing a normalized
    score [0,1] representing linear decay inside a range. like :

script_score: " clamped_value = max(min(doc['field_i'].value),max_value,
min_value); return (clamped_value - min)/(max-min)"

I would like to aggregate all these scores with different weights to get a
global normalized score like:

either a weighted mean / linear combinaison e.g. global_score = sum
(score_field_i * weight_field_i) / sum(weight_field_i)
or a harmonic mean

How to do that? Do I have to implement a specific scorer , if yes, is there
any code example

  1. I would like to keep these subscores to display then in the results for
    each doc or even play with facets..

How to do that?


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
To view this discussion on the web visit
For more options, visit

(system) #2