[source, ruby]
----
response = client.indices.create(
  index: 'latvian_example',
  body: {
    settings: {
      analysis: {
        filter: {
          latvian_stop: {
            type: 'stop',
            stopwords: '_latvian_'
          },
          latvian_keywords: {
            type: 'keyword_marker',
            keywords: [
              'piemērs'
            ]
          },
          latvian_stemmer: {
            type: 'stemmer',
            language: 'latvian'
          }
        },
        analyzer: {
          rebuilt_latvian: {
            tokenizer: 'standard',
            filter: [
              'lowercase',
              'latvian_stop',
              'latvian_keywords',
              'latvian_stemmer'
            ]
          }
        }
      }
    }
  }
)
puts response
----
