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

Cyr*_*ris 7 elasticsearch elasticsearch-ruby

我正在尝试升级到 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}
Run Code Online (Sandbox Code Playgroud)

在检查破坏性变化时,确实提到

标准令牌过滤器已被删除,因为它不会更改流中的任何内容。

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

{
  "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"]
      }
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

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

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

  • ES 7.3.2
  • elasticsearch-api-7.3.0 | 弹性搜索传输 7.3.0
  • 弹性搜索模型 7.0.0 | 弹性搜索导轨 7.0.0

Cyr*_*ris 10

答案在评论中给出,请支持 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"]
      }
    }
  }
}
Run Code Online (Sandbox Code Playgroud)