Many articles and talks document how to use Elasticsearch as a search engine, but few go into detail about the powerful aggregation and analytical tools Elasticsearch provides. This talk will walk you through practical examples written in PHP using nested aggregations to quickly segment and provide data for charting among millions of records within a web request.