elasticsearch - Ruby:ElasticSearch:升级Chewy/ElasticSearch版本时出错

标签 elasticsearch ruby-on-rails-5 elasticsearch-mapping chewy-gem

我一直在我的rails应用程序中使用gem chewy创建索引并在ElasticSearch中搜索。以前,我使用的是 flex 搜索版本5.6,现在我想将其升级到7.7。当我尝试创建索引时,出现以下错误。我在5.1.0中使用的升级版耐嚼版

Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [country : {value={}}] [city : {value={}}] [state : {value={}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters:  [country : {value={}}] [city : {value={}}] [state : {value={}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters:  [country : {value={}}] [city : {value={}}] [state : {value={}}]"}},"status":400}
但是,它与5.6完美配合。我试图在耐嚼中找到任何更改日志,但都找不到。请帮助我了解问题所在。
谢谢

最佳答案

这是由于最新版本的elasticsearch中的removal of types导致的。您需要更改映射和索引定义才能解决该问题。
另外,如果要从5.X迁移到7.7,请引用schedule of removal types according to versions以及需要执行哪些所有步骤。

关于elasticsearch - Ruby:ElasticSearch:升级Chewy/ElasticSearch版本时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64399495/

相关文章:

elasticsearch - 如何在 elasticsearch 中查询数组内的空日期?

ruby-on-rails - 升级到 Ruby 2.6.5 后 Heroku 部署失败

Elasticsearch 找不到独立的保留字符

elasticsearch - 当在映射的属性中给定分析器时如何分析句子-ElasticSearch

elasticsearch - 在 Elasticsearch 中存储树的最佳结构?

java - Elasticsearch安装

elasticsearch - 无法将MySQL的数据同步到Logstash

ruby-on-rails - 如何修改在操作中在 Controller 中设置的 `params`?

ruby - 切片 vs 提取!轨道 5

elasticsearch - elasticsearch映射分析器-GET未获得结果