添加字段并设置类型 PUT /my_index/_mapping/my_type { "base_policy_basic_info": { "properties": { "city": { "type": "text", "analyzer":"ik_max_word", "fields":{ "raw": { "type": "keyword" } } } } } }