Snowball 分词过滤器编辑

使用 Snowball 生成的词干提取器对词语进行词干提取的过滤器。`language` 参数使用以下可用值控制词干提取器:`Arabic`、`Armenian`、`Basque`、`Catalan`、`Danish`、`Dutch`、`English`、`Estonian`、`Finnish`、`French`、`German`、`German2`、`Hungarian`、`Italian`、`Irish`、`Kp`、`Lithuanian`、`Lovins`、`Norwegian`、`Porter`、`Portuguese`、`Romanian`、`Russian`、`Serbian`、`Spanish`、`Swedish`、`Turkish`。

例如

response = client.indices.create(
  index: 'my-index-000001',
  body: {
    settings: {
      analysis: {
        analyzer: {
          my_analyzer: {
            tokenizer: 'standard',
            filter: [
              'lowercase',
              'my_snow'
            ]
          }
        },
        filter: {
          my_snow: {
            type: 'snowball',
            language: 'Lovins'
          }
        }
      }
    }
  }
)
puts response
PUT /my-index-000001
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_analyzer": {
          "tokenizer": "standard",
          "filter": [ "lowercase", "my_snow" ]
        }
      },
      "filter": {
        "my_snow": {
          "type": "snowball",
          "language": "Lovins"
        }
      }
    }
  }
}