Facets have been removed. Use the terms aggregation with the stats aggregation or the extended_stats aggregation instead.
terms
stats
extended_stats