我在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) –