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