【发布时间】:2020-07-04 04:37:32
【问题描述】:
我有两个 Elastic Search 版本,一个是 7.3,第二个是 7.1。我正在为 Elastic Search 7.3 使用 flattened 数据类型,并且我还想在 Elastic Search 7.1 中使用此数据类型。这样我就可以像存储在 Elastic Search 7.3 中一样存储我的数据。
我研究了 flattened 数据类型并知道它支持 7.x 但是当我在 7.1 中尝试时它给了我 mapper_parsing_exception 错误。
我尝试的如下所示。
- 在
Elastic Search 7.3索引创建
回应:PUT demo-flattened{ "acknowledged": true, "shards_acknowledged": true, "index": "demo-flattened" }插入映射
回应:PUT demo-flattened/_mapping { "properties": { "host": { "type": "flattened" } } }{ "acknowledged": true } - 在
Elastic Search 7.1
回应:PUT demo-flattened{ "acknowledged": true, "shards_acknowledged": true, "index": "demo-flattened" }插入映射
回应:PUT demo-flattened/_mapping { "properties": { "host": { "type": "flattened" } } }{ "error": { "root_cause": [ { "type": "mapper_parsing_exception", "reason": "No handler for type [flattened] declared on field [host]" } ], "type": "mapper_parsing_exception", "reason": "No handler for type [flattened] declared on field [host]" }, "status": 400 }
我想在 Elastic Search 7.1 中使用 flattened 数据类型。在 7.1 版本中是否可以使用 flattened 数据类型,因为 Elastic Search 7.3 支持 flattened 数据类型。
任何帮助或建议将不胜感激。
【问题讨论】:
标签: elasticsearch elasticsearch-7