首页 > 其他 > 详细

ElasticSearch命令增加字段总结

时间:2017-08-22 10:25:45      阅读:631      评论:0      收藏:0      [点我收藏+]

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"}}}‘

 

ElasticSearch命令增加字段总结

原文:http://www.cnblogs.com/atomicbomb/p/7410177.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!