

删除后,查询id为1的


删除索引

再次查询




由于ip换了,启动报错了:No living connections

不知道怎么改配置文件,就将容器删除,在新建容器


POST /customer/external/_bulk
{"index":{"_id":"1"}}
{"name": "John Doe" }
{"index":{"_id":"2"}}
{"name": "John Doe" }

POST /_bulk
{"delete":{"_index":"website","_type":"blog","_id":"123"}}
{"create":{"_index":"website","_type":"blog","_id":"123"}}
{"title":"my first blog post"}
{"index":{"_index":"website","_type":"blog"}}
{"title":"my second blog post"}
{"update":{"_index":"website","_type":"blog","_id":"123"}}
{"doc":{"title":"my updated blog post"}}


https://github.com/elastic/elasticsearch/blob/master/docs/src/test/resources/accounts.json ,导入测试数据, POST bank/account/_bulk

数据复制完后,ctrl + home可以回到最上面


本文详细介绍了如何使用Elasticsearch进行批量数据操作,包括数据的导入、删除、更新及创建。通过具体的API示例,如POST/_bulk、POST/customer/external/_bulk等,展示了如何高效地管理和操作大量数据。
543

被折叠的 条评论
为什么被折叠?



