[source, ruby]
----
response = client.indices.create(
  index: 'test_index',
  body: {
    settings: {
      index: {
        analysis: {
          analyzer: {
            synonym: {
              tokenizer: 'standard',
              filter: [
                'my_stop',
                'synonym'
              ]
            }
          },
          filter: {
            my_stop: {
              type: 'stop',
              stopwords: [
                'bar'
              ]
            },
            synonym: {
              type: 'synonym',
              lenient: true,
              synonyms: [
                'foo, bar => baz'
              ]
            }
          }
        }
      }
    }
  }
)
puts response
----
