一、配置
节点和分片:
节点:节点就是我们一个个的主机,你也可以理解为一个个的ES
分片:分片就是将原来存放在一个节点上面的数据进行分片,然后存放到不同的节点。
二、操作
创建索引:
PUT 索引名称
{
"settings" : {
#分片数量
"number_of_shards":25,
"number_of_replicas" : 1,
"refresh_interval":"30s"
},
"mappings": {
"properties": {
"sku_name": {
"type": "text"
},
"item_first_name": {
"type": "text"
},
"item_second_name": {
"type": "text"
},
"item_third_name": {
"type": "text"
},
"prc": {
"type": "float"
}
}
}
}
查询
GET 索引名称/_search
{"query":
{
"match_phrase":
{
"sku_name":"唱悠S6 家庭KTV音箱功放无线话筒 音箱设备套装 卡拉ok点歌卡包房家用音响"
}
}
}
三、外部数据的操作
参考资料
https://blog.youkuaiyun.com/congge_study/article/details/127833872 (kibana操作)
https://blog.youkuaiyun.com/awodwde/article/details/113819081(kibana查询操作)
https://www.cnblogs.com/honeybee/p/6293634.html (hive数据写入,使用更新模式)
https://help.aliyun.com/document_detail/72660.html (容量规格说明)
https://blog.youkuaiyun.com/lizz861109/article/details/129041608 (ES规划设计)