Scripted field on Aggregated value

Hi Krishna,

Scripted fields work only on values within each individual doc. So if a doc had 3 numeric fields you could use a scripted field to add them together, or average them, or find the min, max, etc. But not across all docs or a set of docs.

But you can also use some scripting within Visualizations in the Advanced JSON field;

I don't know of very many exampels of using it, but here's one;