给索引添加一个字段
PUT /type/mappings/_mapping
{
"properties": {
"first_bid_company": {
"type": "text",
"analyzer": "ik_max_word",
"fielddata": true,
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
给索引的一个已有字段添加属性(将该字段的所有属性都写上)
PUT /new_index/index/_mapping
{
"properties":{
"table_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}