How to iterate over Geopoints in painless?

Thanks for your suggestion,

Such request exist since a long time, see:

In the current situation, the script is necessary... it allows me to generate fields for debugging my DSL ! I will remove it in production.

It is to debug another query, that use distance_feature (That I can't make it work):

My sorting is based on multiples criterions... not only the distance.

But anyway, I suspect that I should use it in my query... (I don't like this, but maybe there are no other choices).