How to extend terms aggregation in elasticsearch