我使用的是ES-2.4.0
索引json:{ "_id": 1, "name": "Longsword", "description": "The Longsword can be wielded in one or two hands", "category": "Sharp" }
1.我创建了一个索引,正在创建默认映射 .
2.现在我正在尝试更新此处建议的映射 .
链接:https://gist.github.com/nicolashery/6317643
关于 point 1 : i have not used any analyzer ;
关于 point 2 : i am using analyser "not_analysed" ;
但它没有用 .
Question : Has ES-2.X stopped mapping updation facility if not how can i update the mapping ?
注意:尝试我收到此错误
{“error”:{“root_cause”:[{“type”:“illegal_argument_exception”,“reason”:“[name]的映射器与其他类型的现有映射冲突:\ n [mapper [name]有不同的[analyzer] ]]“}],”type“:”illegal_argument_exception“,”reason“:”[name]的映射器与其他类型的现有映射冲突:\ n [mapper [name]有不同的[analyzer]]“},”status “:400}
1 回答
不,不允许更改现有字段的映射类型 ES 2.x .
来自documentation
您必须首先delete the index并使用新映射创建一个新的 . 还有一个小错字,它是 not_analyzed ("z"不是"s")