Kibana基本操作ElasticSearch

查询ES中所有数据

GET _search
{
"query": {
"match_all": {}
}
}

查询集群状况

GET _cat/health?v

查询节点信息

GET _cat/nodes?v

查询索引

GET _cat/indices

创建index 有两种方式 PUT POST

PUT 创建自定义属性 POST会自动创建规定的属性

PUT /test_index
{
"mappings": {
"_doc" : {
"properties" : {
"username" : {"type":"text"},
"password" : {"type":"long"}
}
}
}
}

查询映射关系

GET /test_index/_mapping/_doc/

插入数据

PUT /test_index/_doc/1
{
"username" : "logincat",
"password" : "123"
}

查询id=1的数据

GET /test_index/_doc/1

只显示数据

GET /test_index/_doc/1/_source

修改数据只能使用POST 而且需要使用_update 应该时之前的版本 6.5就可以用PUT

POST /test_index/_doc/1/_update
{
"doc": {
"password" : "12345"
}
}

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容