From Marvel, I can tell that my cluster contains 240 million docs and 640GB. I'd like to drill down further into this, asking questions like:
- What is the average document size?
- What are the largest documents?
- Which fields occupy the most space?
I've tried to run an aggregation to answer the first question:
GET /profound_v2/urls/_search
{
"query" : {"match_all" : {}},
"aggs" : {"avg_size" : {"avg" : {"terms" : {"field" : "_size"}}}}
}
But I get an error:
"root_cause": [
{
"type": "search_parse_exception",
"reason": "Unexpected token START_OBJECT in [avg_size].",
"line": 3,
"col": 46
}
]
Could someone please put me on the right track?