Aggregating subscores for each field and displaying subscores

hi,

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?

Thanks

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/8d0edb45-ab76-41e3-b9e3-23174e1b505c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.