Elasticsearch-curl进行简单操作
来源:互联网 发布:Mac用什么浏览器好 编辑:程序博客网 时间:2024/06/05 07:08
创建Index
curl -XPUT 'localhost:9200/customer?pretty'
创建类型并添加数据
curl -XPUT 'localhost:9200/customer/external/1?pretty' -d '{ "name": "John Doe"}'
获取文档
curl -XGET 'localhost:9200/customer/external/1?pretty'
删除索引
curl -XDELETE 'localhost:9200/customer?pretty'
命令格式
curl -X<REST Verb> <Node>:<Port>/<Index>/<Type>/<ID>
更新命令
curl -XPOST 'localhost:9200/customer/external/1/_update?pretty' -d '{ "doc": { "name": "Jane Doe" }}'curl -XPOST 'localhost:9200/customer/external/1/_update?pretty' -d '{ "script" : "ctx._source.age += 5"}'
删除文档
curl -XDELETE 'localhost:9200/customer/external/2?pretty'
批量操作
curl -XPOST 'localhost:9200/customer/external/_bulk?pretty' -d '{"index":{"_id":"1"}}{"name": "John Doe" }{"index":{"_id":"2"}}{"name": "Jane Doe" }'curl -XPOST 'localhost:9200/customer/external/_bulk?pretty' -d '{"update":{"_id":"1"}}{"doc": { "name": "John Doe becomes Jane Doe" } }{"delete":{"_id":"2"}}'
0 0
- Elasticsearch-curl进行简单操作
- ElasticSearch之CURL操作
- curl命令操作elasticsearch
- elasticsearch 命令行curl操作
- 使用curl命令操作elasticsearch
- 使用curl命令操作elasticsearch
- 使用curl命令操作elasticsearch
- 使用curl命令操作elasticsearch
- 使用curl命令操作elasticsearch
- Elasticsearch简单使用系列--使用Java API进行CRUD操作
- Elasticsearch简单使用系列--使用Rest API进行CRUD操作
- 简单curl操作
- 用curl命令操作Elasticsearch命令笔记
- 用curl 进行 swift操作
- Elasticsearch笔记二之Curl工具基本操作
- 在Windows下使用Curl工具完美操作ElasticSearch
- 使用curl命令操作elasticsearch And 使用http 查询ES
- elasticsearch之curl操作PUT和POST区别
- 什么是SCRUM?
- Codeforces Round #290 (Div. 2) A. Fox And Snake
- 版本更新
- Python随学随记(3)
- jQuery serializeObject 序列化 form 表单 Json 对象 jQuery.extend() 合并对象
- Elasticsearch-curl进行简单操作
- 版本更新
- 十二、代理Proxy(结构型)
- 2016.07.28自学笔记----Android手机地图,开发只要5分钟?
- SliddingMenu侧滑
- Hdu-5773 The All-purpose Zero(LIS变形)
- CSU 1224: ACM小组的古怪象棋
- 文章标题
- Java 理论与实践: 流行的原子