[source, ruby]
----
response = client.search(
  index: 'node_upgrade',
  body: {
    size: 0,
    aggregations: {
      startup_time_ttest: {
        t_test: {
          a: {
            field: 'startup_time_before'
          },
          b: {
            field: 'startup_time_after'
          },
          type: 'paired'
        }
      }
    }
  }
)
puts response
----
