码迷,mamicode.com
首页 > 其他好文 > 详细

elasticsearch 批量插入

时间:2016-05-28 20:42:29      阅读:385      评论:0      收藏:0      [点我收藏+]

标签:

将下面数据写入requests

{ "create": { "_index": "index1", "_type": "resource", "_id": 1 } }
{ "title": "周星驰最新电影" }
{ "create": { "_index": "index1", "_type": "resource", "_id": 2 } }
{ "title": "周星驰最好看的新电影" }
{ "create": { "_index": "index1", "_type": "resource", "_id": 3 } }
{ "title": "周星驰最新电影,最好,新电影" }
{ "create": { "_index": "index1", "_type": "resource", "_id": 4 } }
{ "title": "最最最最好的新新新新电影" }
{ "create": { "_index": "index1", "_type": "resource", "_id": 5 } }
{ "title": "I‘m not happy about the foxes" }

  curl -XPOST http://localhost:9200//_bulk --data-binary "@requests"。

elasticsearch 批量插入

标签:

原文地址:http://www.cnblogs.com/hee0624/p/5538236.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!