[source, ruby]
----
response = client.indices.create(
  index: 'index',
  body: {
    settings: {
      analysis: {
        normalizer: {
          my_normalizer: {
            type: 'custom',
            char_filter: [],
            filter: [
              'lowercase',
              'asciifolding'
            ]
          }
        }
      }
    },
    mappings: {
      properties: {
        foo: {
          type: 'keyword',
          normalizer: 'my_normalizer'
        }
      }
    }
  }
)
puts response

response = client.index(
  index: 'index',
  id: 1,
  body: {
    foo: 'BÀR'
  }
)
puts response

response = client.index(
  index: 'index',
  id: 2,
  body: {
    foo: 'bar'
  }
)
puts response

response = client.index(
  index: 'index',
  id: 3,
  body: {
    foo: 'baz'
  }
)
puts response

response = client.indices.refresh(
  index: 'index'
)
puts response

response = client.search(
  index: 'index',
  body: {
    query: {
      term: {
        foo: 'BAR'
      }
    }
  }
)
puts response

response = client.search(
  index: 'index',
  body: {
    query: {
      match: {
        foo: 'BAR'
      }
    }
  }
)
puts response
----
