ElasticSearch 在 kibana中的_bulk批量操作
put 方式 创建 索引

如果继续点击创建 则会报错 说该索引已存在

创建文档
获取文档

测试数据
_bulk批量操作,语法格式
json
{action:{metadata}}\n
{request body }\n
{action:{metadata}}\n
{request body }\n
```
案例
```json
POST /bobo/system/_bulk
{"index":{"_id":"1"}}
{"name":"dpb"}
{"index":{"_id":"2"}}
{"name":"dpb2"}
此时我们发现提交的数据 在postman中不支持 所以 我们用kibana
访问kibana
http://192.168.1.137:5601
POST /lcc/system/_bulk {"index":{"_id":"1"}} {"name":"dpb"} {"index":{"_id":"2"}} {"name":"dpb2"}

获取文档数据验证

复杂点的案例: json POST /_bulk 这是在所有索引库下操作 {"delete":{"_index":"website","_type":"blog","_id":"123"}} {"create":{"_index":"website","_type":"blog","_id":"123"}} {"title":"My first bolg post ..."} {"index":{"_index":"website","_type":"blog"}} {"title":"My second blog post ..."} {"update":{"_index":"website","_type":"blog","_id":"123"}} {"doc":{"title":"My updated blog post ..."}}




浙公网安备 33010602011771号