ES相关命名

使用Kibana的开发工具进行查看

 

查看ES集群健康状态:GET /_cat/health或者使用curl命令来实现,

curl --user xxx:'xxx'  -X GET "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/_cat/health?v"

 

 

查看集群状态

curl --user xxx:'xxx' -X GET "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/_cat/nodes?pretty"|more

查看node节点:

curl --user xxx:'xxx' -X GET "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/_cat/nodes"

查看集群版本:

curl --user xxx:'xxx'  -X GET "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/"

查看集群状态:

curl --user xxx:'xxx' -X GET "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/_cluster/state?pretty"|more

查看所有索引信息:

curl --user xxx:'xxx' -X GET "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/_cat/indices?pretty"

创建索引ghd

curl --user xxx:'xxx'  -X PUT "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/ghd"

删除索引ghd:

curl --user xxx:'xxx'  -X DELETE "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/ghd"

创建文档:

[root@iZ2ze9swf380tpqgf9a38eZ ~]# curl --user xxx:'xxx'  -X POST "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/ghd/_doc/ghd_document?pretty" -H 'Content-Type: application/json' -d '  {
"name":"shaofei",
"age":22,
"sex":1
}'

 修改文档

[root@iZ2ze9swf380tpqgf9a38eZ ~]# curl --user xxx:'xxx'  -X POST "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/ghd/_doc/ghd_document?pretty" -H 'Content-Type: application/json' -d '  { 
> "name":"upuptop",
> "age":25,
> "sex":0,
> "number":"1501260222" 
> }'

  查看文档内容

[root@iZ2ze9swf380tpqgf9a38eZ ~]# curl --user xxx:'xxx'  -X GET "es-cn-tl32l8nrk0008016i.xxxsearch.aliyuncs.com:9200/ghd/_doc/ghd_document"

  

 

 

posted @ 2022-03-01 18:04  什么都不会的小郭  阅读(168)  评论(0编辑  收藏  举报