安装
概念
操作
命令
curl -XPUT http://node01:9200/blog01/?pretty
curl -XPUT http://node01:9200/blog01/article/1?pretty -d ‘{"id": "1", "title": "What is lucene"}‘
curl -XGET http://node01:9200/blog01/article/1?prettycurl -XPUT http://node01:9200/blog01/article/1?pretty -d ‘{"id": "1", "title": " What is elasticsearch"}‘
curl -XGET "http://node01:9200/blog01/article/_search?q=title:elasticsearch"
curl -XDELETE "http://node01:9200/blog01/article/1?pretty"
curl -XDELETE http://node01:9200/blog01?pretty
POST /school/student/_bulk
{ "index": { "_id": 1 }}
{ "name" : "liubei", "age" : 20 , "sex": "boy", "birth": "1996-01-02" , "about": "i like diaocan he girl" }
{ "index": { "_id": 2 }}
{ "name" : "guanyu", "age" : 21 , "sex": "boy", "birth": "1995-01-02" , "about": "i like diaocan" }
GET /school/student/_search?pretty
{
"query": {
"match_all": {}
}
}
GET /school/student/_search?pretty
{
"query": {
"match": {"about": "travel"}
}
}
DELETE school
PUT school
{
"mappings": {
"logs" : {
"properties": {"messages" : {"type": "text"}}
}
}
}
POST /school/_mapping/logs
{
"properties": {"number" : {"type": "text"}}
}
GET /school/_mapping/logs
DELETE document
PUT document
{
"mappings": {
"article" : {
"properties":
{
"title" : {"type": "text"} ,
"author" : {"type": "text"} ,
"titleScore" : {"type": "double"}
}
}
}
}
GET /document/_settings
PUT /document/_settings
{
"number_of_replicas": 2
}
分片数初始定义后无法修改
参考
安装
https://cloud.tencent.com/developer/article/1595027
root用户无法启动
https://www.cnblogs.com/tree1123/p/13152267.html
hive数据存入ES
http://www.bubuko.com/infodetail-3047662.html
elasticsearch-head安装
https://www.chajianmi.com/topic/ffmkiejjmecolpfloofpjologoblkegm#download
https://blog.csdn.net/boss_way/article/details/105826584
基本操作
https://www.cnblogs.com/leohahah/p/10310214.html
分片异常
https://www.cnblogs.com/carryLess/p/9452000.html
kibana
https://blog.csdn.net/baidu_24545901/article/details/79031291
原文:https://www.cnblogs.com/cxc1357/p/13888955.html