How do I get max of all the selected records in function score

I wanted to use gauss function like below to change the relevance algo.

"gauss": {
"price": {
"origin": "50",
"offset": "50",
"scale": "20"
}
},
"weight": 2

My problem is that prices of the products varies significantly so I am not able to use any fixed origin(
e.g. lets say that prices of the products vary from 0 to 100000 but after applying filters the filtered products have prices ranging between 100 to 5000 all of them get a zero score if I use 100000 as the origin.)
Is there a way I can get a relative value gauss curve(i.e. it looks at the values available after all the filters being applied and form gauss curve based on percent distribution of the values. in the above example origin should be 5000 and offset is 100 and scale is 100 where as if my result set consists of products having prices 100000 to 80,000 it should set origin to 100000 and scale and offset accordingly so that I get proper distribution)