Wow, nice script @colings86 and @jpountz
@EricK if you have scripting enabled in elasticsearch you can use it within your date_histogram by overriding the aggregations parameters with the "JSON input" advanced config option. This would look something like the screenshot below (note the field: null
bit which removes the field parameter from the params):