[source, ruby]
----
response = client.indices.create(
  index: 'ngram_custom_example',
  body: {
    settings: {
      index: {
        max_ngram_diff: 2
      },
      analysis: {
        analyzer: {
          default: {
            tokenizer: 'whitespace',
            filter: [
              '3_5_grams'
            ]
          }
        },
        filter: {
          "3_5_grams": {
            type: 'ngram',
            min_gram: 3,
            max_gram: 5
          }
        }
      }
    }
  }
)
puts response
----
