Sure, I'll add some more tests. Also the testSortByBucket kinda shows how real world field collapsing can be used. (by adding a second metric agg (min or max) that is used by the terms agg for ordering)

> SearchWithRandomException etc. to make sure they don't leak files etc?

I think that makes sense, but lets do that outside of the PR.