ElasticSearch命令增加字段总结

1、建立一个String类型的字段

curl -XPUT http://192.168.46.163:9200/t_risk_case/_mapping/t_risk_case?pretty -d '{"properties":{"uuid":{"type":"string"}}}' 

2、建一个嵌套型的字段

curl -XPUT http://192.168.46.163:9200/t_risk_case/_mapping/t_risk_case?pretty -d '{"properties":{"case_details":{"type":"nested"}}}'

3、建一个不做分词的字段

 curl -XPUT http://192.168.46.163:9200/t_risk_case/_mapping/t_risk_case?pretty  -d '{"properties":{"title":{"type":"string","index":"not_analyzed"}}}'