Adding API to get aggregate of terms for a given field.