elasticsearch版本: 6.5.4
创建mapping
PUT http://192.168.2.136:9200/index_text/_mapping/text/
{
"dynamic": "false",
"properties": {
"id": {
"type": "keyword"
},
"edit_status_t": {
"type": "text"
},
"content_t": {
"type": "text",
// 分词-采用单字分词器
"analyzer": "standard"
},
"content_type_t": {
"type": "text"
}
"question_id_t": {
"type": "keyword"
}
"type_txt": {
"type": "keyword"
},
"create_time_dt": {
"type": "date",
// 日期格式
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
}
}
}
添加mapping属性:
PUT http://192.168.2.136:9200/index_text/_mapping/text/
{
"properties": {
"update_time_dt": {
"type": "date",
// 日期格式
"format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
}
}
}