Skip to main content

Posts

Showing posts from May, 2019

elasticsearch bulk add

Batch insert data into Elasticsearch
When I want to batch add documents to elasticsearch, this is how I do
I create an index:
curl -XPUT localhost:9200/tmp2I prepare the file for batch insertion (official documentation)
{ "create" : { "_index" : "tmp2", "_id" : "1" } } {"title": "RxJS: How to Use refCount","link": "https://blog.angularindepth.com/rxjs-how-to-use-refcount-73a0c6619a4e","text": "My previous article — Understanding the publish and share Operators — looked only briefly at the refCount method. Let’s look at it more closely here."} { "create" : { "_index" : "tmp2", "_id" : "12" } } {"title": "I reverse-engineered Zones (zone.js) and here is what I’ve found","link": "https://blog.angularindepth.com/i-reverse-engineered-zones-zone-js-and-here-is-what-ive-found-1f48dc87659b","…