[source, ruby]
----
response = client.search(
  index: 'my-index-000001',
  body: {
    aggregations: {
      avg_start: {
        avg: {
          field: 'measures.start'
        }
      },
      avg_end: {
        avg: {
          field: 'measures.end'
        }
      }
    }
  }
)
puts response
----
