Michael Müller
Michael Müller

Reputation: 401

Elasticsearch 6.6 bulk insert with Postman 6.7

I read various guides to bulk insert data into an index. But what ever I do the /n is not working. I guess there is some change in an Update of Postman or ES?

I try to POST to

 localhost:9200/urls/url/_bulk

In the JSON field with JSON formated

{ "index" : {}} \n
{ "url" : "www.url1.com" } \n
{ "index" : {}} \n
{ "url" : "www.url2.com" } \n

Upvotes: 2

Views: 2545

Answers (1)

Michael Müller
Michael Müller

Reputation: 401

Pretty weird but I got it.

The Code needs an empty line at the end:

"
{ "index" : { "_index" : "test", "_type" : "_doc" } } 
{ "url" : "www.url1.com" } 
{ "index" : { "_index" : "test2", "_type" : "_doc" } } 
{ "url" : "www.url1.com" } 

"

Upvotes: 3

Related Questions