Is there any better way in elasticsearch (other than issuing a match all query and manually averaging over the length of all returned documents) to get the average document
In ElasticSearch 6.2 you should just use the following line (no need to add 'terms'):
"aggs" : {"avg_size" : {"avg" : {"field" : "_size"}}}
See details here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-avg-aggregation.html