gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 22:09:55 27 4
gpt4 key购买 nike

我正在尝试升级到 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.



我不确定我应该如何在我的配置中反射(reflect)这一点。如果我理解正确,此错误可能来自我的自定义短语建议器
{
"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 field ?也许他们忘了更新它,但这仍然是 [Elasticsearch documentation of the suggester][1] 中提到的内容。

如果问题不是从那里来的,我应该去哪里查看?
  • ES 7.3.2
  • elasticsearch-api-7.3.0 | Elasticsearch 传输 7.3.0
  • Elasticsearch 模型 7.0.0 | Elasticsearch 导轨 7.0.0
  • 最佳答案

    答案在评论中给出,请支持 Rob 的评论(我不喜欢保留 Unresolved 问题,所以我添加这个答案是为了完成)

    {
    "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"]
    }
    }
    }
    }

    关于Elasticsearch 7 [标准] token 过滤器已被删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58202006/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com