我一直在我的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/