我试图_timestamp
在索引上定义属性。所以首先,我创建索引
curl -XPUT 'http://elasticsearch:9200/ppe/'
来自服务器的响应:{"ok":true,"acknowledged":true}
然后我尝试用_timestamp
curl -Xput 'http://elasticsearch:9200/ppe/log/_mapping' -d '{
"log": {
"properties": {
"_ttl": {
"enabled": true
},
"_timestamp": {
"enabled": true,
"store": "yes"
},
"message": {
"type": "string",
"store": "yes"
},
"appid": {
"type": "string",
"store": "yes"
},
"level": {
"type": "integer",
"store": "yes"
},
"logdate": {
"type": "date",
"format": "date_time_no_millis",
"store": "yes"
}
}
}
}'
我从服务器收到答案
{
"error": "MapperParsingException[No type specified for property [_timestamp]]",
"status": 400
}
我的映射有什么问题?