Kibana批量插入文档操作

批量创建文档

	POST _bulk
	{"index":{"_index":"test","_type":"product","_id":10001}}
	{"code":"540785126782","price":398,"name":"房屋卫士自流平美缝剂瓷砖地砖专用双组份真瓷胶防水填缝剂镏金色","place":"上海","category":"品质建材"}
	{"index":{"_index":"test","_type":"product","_id":10002}}
	{"code":"24727352473","price":21.79,"name":"艾瑞泽手工大号小号调温热熔胶枪玻璃胶枪硅胶条热溶胶棒20W-100W","place":"山东青岛","category":"品质建材"}
	{"index":{"_index":"test","_type":"product","_id":10003}}

注意

bulk api对json语法有严格的要求,每个json串不能换行,只能放到一行,同时一个json串和一个json串之间必须要换行,否则会出现如下错误。
在这里插入图片描述在这里插入图片描述

查询数据:

GET test/_search

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/chen18677338530/article/details/93067493
今日推荐