ElasticSearch之CURL操作
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ElasticSearch之CURL操作相关的知识,希望对你有一定的参考价值。
参考技术A 建立索引库company(PUT和POST都可以,索引库名必须小写):创建索引,其中employee是type,1是document,-d是指定要传输的数据(遵循JSON格式):
curl -XPOST 'localhost:9200/logstash-zhifubao-2018.09.18/_search?pretty' -d '"query": "match_all": ,"from": 10,"size": 10'
curl -XGET http://localhost:9200/logstash-zhifubao-2018.08.15/_status
curl -XGET http://localhost:9200/logstash-zhifubao-2018.08.15/message/0ea1b2df-caa4-457c-8cc1-294f5e9284c7/_search?pretty
curl -XGET http://localhost:9200/logstash-zhifubao-2018.08.15/_search?q=message:0ea1b2df-caa4-457c-8cc1-294f5e9284c7
curl -XGET http://localhost:9200/logstash-zhifubao-2018.08.15/_search?q=message:0ea1b2df-caa4-457c-8cc1-294f5e9284c7?_source=message
Curl –XGET http://localhost:9200/_cluster/health?pretty
http://localhost:9200/_cluster/health?pretty
Curl:curl -XGET http://localhost:9200/shb01,shb02/stu,tea/_search?pretty
curl -XGET http://localhost:9200/_all/stu,tea/_search?pretty
curl -XGET http://localhost:9200/shb01/stu/_search?size=2&from=0
crul –XPUT http:localhost:9200/shb01/student/1/_update?version=1
–d ‘“doc”:“name”:”updatename”
curl -XDELETE http://localhost:9200/shb01/student/AVad05EExskBS1Rg2tdq
curl -XDELETE http://localhost:9200/_all/_query?q=name:tom
查询设置集群状态
URL 说明
URL 说明
URL 说明
以上这些操作和可以通过如
以上是关于ElasticSearch之CURL操作的主要内容,如果未能解决你的问题,请参考以下文章
Elastic:Sense chrome - 在 chrome 浏览器中操作 Elasticsearch 的插件