Is it possible to add a field to all document in an index which the field is an aggregation result?

See Unable to calculate duration by 2 dates fields for some inspiration