前提是 需要ES 集群的:es集群配置
先下载数据:
baimei.json(es 数据): 连接
全部的数据在这里:
https://gitee.com/wang-huamao/es-test/blob/master/data/baimeidashu-shopping.json
shoping
POST http://10.0.0.103:9200/baimeidashuedu-shopping/_search # 统计华为商品中最便宜的。
然后我们导入数据:
(1)创建索引
PUT
http://10.0.0.111:19200/baimei
{
"mappings" :{
"properties": {
"title": {
"type": "text"
},
"price": {
"type": "float"
},
"brand": {
"type": "keyword"
},
"item": {
"type": "text"
},
"group": {
"type": "byte"
},
"ip_addr" : {
"type": "ip"
},
"auther": {
"type": "text"
}
}
},
"settings": {
"number_of_shards":3,
"number_of_replicas":0
}
}
(2)开始导入数据
POST
10.0.0.111:19200/_bulk
欢迎来撩 : 汇总all