[source, ruby]
----
response = client.indices.create(
  index: 'drivers',
  body: {
    mappings: {
      properties: {
        driver: {
          type: 'nested',
          properties: {
            last_name: {
              type: 'text'
            },
            vehicle: {
              type: 'nested',
              properties: {
                make: {
                  type: 'text'
                },
                model: {
                  type: 'text'
                }
              }
            }
          }
        }
      }
    }
  }
)
puts response
----
