Elasticsearch 7 [标准] 令牌过滤器已被删除

Elasticsearch 7 The [standard] token filter has been removed

我正在尝试升级到 Elasticsearch v7(我正在使用 ruby/rails 客户端),在这样做并修复了一些问题后,我 运行 遇到以下错误

Elasticsearch::Transport::Transport::Errors::BadRequest:
  [400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The [standard] token filter has been removed."}],"type":"illegal_argument_exception","reason":"The [standard] token filter has been removed."},"status":400}

检查重大更改后,确实提到

The standard token filter has been removed because it doesn’t change anything in the stream.

我不确定我应该如何在我的配置中反映这一点。如果我理解正确的话,这个错误可能来自我的自定义短语建议

{
  "analysis": {
    "filter": {
      "shingle": {
        "type": "shingle",
        "min_shingle_size": 2,
        "max_shingle_size": 3
      }
    },
    "analyzer": {
      "trigram": {
        "type": "custom",
        "tokenizer": "standard",
        "filter": ["standard", "shingle"]
      },
      "reverse": {
        "type": "custom",
        "tokenizer": "standard",
        "filter": ["standard", "reverse"]
      }
    }
  }
}

我应该只删除 tokenizer 字段吗?也许他们忘了更新它,但这仍然是 [Elasticsearch documentation of the suggester][1]

中提到的内容

如果问题不是来自那里,我应该去哪里查看?

在评论中归功于@Rob:

{
  "analysis": {
    "filter": {
      "shingle": {
        "type": "shingle",
        "min_shingle_size": 2,
        "max_shingle_size": 3
      }
    },
    "analyzer": {
      "trigram": {
        "type": "custom",
        "tokenizer": "standard",
        "filter": ["shingle"]
      },
      "reverse": {
        "type": "custom",
        "tokenizer": "standard",
        "filter": ["reverse"]
      }
    }
  }
}