[source, ruby]
----
response = client.indices.create(
  index: 'mv',
  body: {
    mappings: {
      properties: {
        b: {
          type: 'long'
        }
      }
    }
  }
)
puts response

response = client.bulk(
  index: 'mv',
  refresh: true,
  body: [
    {
      index: {}
    },
    {
      a: 1,
      b: [
        2,
        2,
        1
      ]
    },
    {
      index: {}
    },
    {
      a: 2,
      b: [
        1,
        1
      ]
    }
  ]
)
puts response

response = client.esql.query(
  body: {
    query: 'FROM mv | EVAL b=TO_STRING(b) | LIMIT 2',
    version: '2024.04.01'
  }
)
puts response
----
