我在Elasticsearch中上传索引时遇到了问题。映射索引Elasticsearch时间戳自定义
curl -H "Content-Type: application/json" -XPUT http://localhost:9200/technogym_error_timeline -d "{\"mappings\":{\"timestamp\":{\"type\":\"date\",\"format\":\"yyyy-MM-dd\"}}}"
我得到这个错误:
{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [format : yyyy-MM-dd] [type : date]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [timestamp]: Root mapping definition has unsupported parameters: [format : yyyy-MM-dd] [type : date]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [format : yyyy-MM-dd] [type : date]"}},"status":400}
为什么我的curl命令错了吗?
谢谢。
的可能的复制[Elasticsearch:根映射定义具有不支持的参数指标:不是\ _analyzed(https://stackoverflow.com/questions/39288997/elasticsearch -root-mapping-definition-has-unsupported-parameters-index-not-a) –